function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
werewolfwerewolf 

Cryptic error message from Force.com IDE

So I'm trying to deploy a pretty simple trigger, and I put a test method that should cover it 100% in a class.  When I try to save everything, I get the message saying I have 0% test coverage.  Ok, fair enough, maybe I just need to run the tests.

So I go to the Classes folder and hit Run Tests.  That should run my tests, right?  Instead I get:

INVALID_OPERATION: Cannot specify both runAllTests and specific RunTests

Huh?  What did I do wrong here?  How can I get it so that it just saves my freaking trigger?  Thanks.
JonPJonP
Have you perhaps created your Force.com IDE project directly against a production environment?

We provide all Apex-enabled organizations with an Apex Sandbox for developing and testing code.  Activate/refresh your Sandbox, create your IDE project against it, and write and test your code until it meets our production deployment requirements.  Then you can use either the "Deploy to Server" wizard in the IDE, or the Apache Ant-based Apex Deployment Tool, to deploy your entire set of code (triggers and classes, including the test methods to meet code coverage requirements) to your production organization.
JonPJonP
Also, please let us know what version of the Force.com IDE you're using.