Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tool to verify that test files are added to the test target #12

Open
lgauthier opened this issue Jan 3, 2017 · 1 comment
Open
Labels

Comments

@lgauthier
Copy link
Collaborator

I'd like to create some kind of tool that can verify that all the test files are added to the test target. It's not uncommon for a test file to get removed from a test target during a .xcodeproj merge conflict resolution. If that happens, entire test classes can ended up being abandoned and forgotten about for a long time.

We'll need to spend some time designing how we'd want this to work, but I'm thinking that no matter how we end up designing it, it's going to have to be some kind of command line tool that can be run as a run script build phase.

@nhgrif
Copy link
Contributor

nhgrif commented Nov 14, 2018

This sounds like a really good idea.

Here are my thoughts on how this should work:

As you mentioned, this probably needs to be a command line tool. I believe we should write that in Swift, and check the source files in to this repository in their own directory... but those source files should not be pulled in by the Podspec. Instead, we need to provide the compiled tool in the Podspec.

Then we need to figure out how to craft the Podspec so that when running pod install, a build phase is added to any targets that list MTK as a dependency to run the tool.

The tricky part is going to be figuring out exactly which files should count. I guess we can look for any files that... what... inherit from XCTestCase (or inherit from a subclass of it)? But we actually need to look at more than just whether or not it's included in the test target. We need to care about whether or not the tests are actually enabled. ... and we probably need to allow for a configuration file, right?

And at this point, I'm thinking this might work as an independent tool, rather than part of MetovaTestKit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants