Save modified files before running tests.
Issue #579
resolved
Maybe it's me, but sometimes I make changes to some files and then I go and click the runtests button. I then realize that I didn't save the files so the tests run with the old files.
I think in the java world it always sets up a build before launch. It would be nice if the apex tests did the same.
Comments (5)
-
repo owner -
repo owner - changed component to Unit Test Integration
- removed version
-
repo owner - changed component to Apex Unit Testing
-
repo owner - changed status to resolved
Delivered in 2.3.1.0.
-
repo owner Additional functionality delivered in 2.3.1.2.
- Log in to comment
Yeah, I considered doing this, but different people have different preferences for how they want deployment to occur. Because deployment can be a time-consuming process, I didn't want a "deploy all" or "deploy modified" to gate execution of unit tests. In fact, I can't do a "deploy modified" if a connection if configured for conflict detection with shared logins because the same timestamps are used for conflict detection, so for those users the only rational option would be to deploy all (or at least all Apex).
Let me chew on options that might work. I might consider adding a configuration option to the new Unit Tests and Code Coverage configuration panel to bring Apex up-to-date before unit test execution, though because Apex can have static references to other metadata such as custom objects/fields and Visualforce pages, even that might not be sufficient.