- marked as enhancement
- marked as minor
Error 403/Forbidden - INVALID_INPUT: This class name's value is invalid: UT_DebugLogger. Provide the name of an Apex class that has test methods.
Hi
I have a run config which contains all of my UTs. I'm now getting this error.
I believe this is because I have some code locally in my IDE that isn't deployed to the sandbox.
Is it possible to only run tests that are up on the org and ignore ones that only live locally?
Cheers Adam
Comments (8)
-
reporter -
reporter - edited description
-
repo owner Hi, Adam. The tests that IC requests to be run are based on those selected in the unit test run configuration. If you check All tests, it will submit a request for every test class/method that you have in the local project. If any of those classes/methods don't exist on the server, unfortunately it will reject the entire request in this manner. I've talked to Salesforce about just saying those particular classes/methods aren't found and running the ones that are, but right now it's all-or-nothing. You can, however, explicitly select just the ones that you know to be on the server in the run config.
I'm going to keep this story open to add an option to verify that selected classes exist before running to work around this issue. That's how it used to work, but in some extremely large orgs, querying the IDs for classes by name could take minutes, so the for developers against those orgs, being able to run tests by name was a major performance gain.
-
reporter Hi Scott
Ok great. Thanks for the explanation!
If possible a feature that checks which tests exist on the server and then ticks only those tests in the config would be mega useful - effectively giving us the "only run tests that exist on the org" feature. Is that something that might be feasible?
Thanks Adam
-
repo owner Adam, I think what I may do is allow you to specify--either at the application-level or perhaps at the run config-level--that you want IC to verify selected classes/methods against what's on the server before sending the request. For small-to-medium-sized orgs, that won't really perform any worse when enabled, and the option will still be there for those really huge orgs to avoid the expense of pulling IDs for names. That will make this pretty much seamless once that option is enabled.
-
reporter Sounds perfect!
Thanks Scott.
-
repo owner - changed status to duplicate
Duplicate of #2387.
-
repo owner - changed component to Apex Unit Testing
- Log in to comment