Save modified files before running tests.

Issue #579 resolved
Mike Wannamaker created an issue

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)

  1. Scott Wells repo owner

    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.

  2. Log in to comment