Closed OlegBogdanovych closed 4 months ago
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
Hey @OlegBogdanovych, I tried to reproduce this with the Dreamhouse sample app and was not able to.
After creating the scratch org and deploying, I ran:
sf apex run test -l RunLocalTests -c -r junit -w 90 -d ./tests/apex
(I had my --target-org
set to default at scratch org creation time)
Can you please provide the output of the same command with the --dev-debug
flag?
Also, if you are able to replicate the issue with Dreamhouse and provide steps, that would be very helpful. Thanks!
Hello @iowillhoit Looks like our issue was related to the runner - as soon as we did hard reload of sf plugins with this commands everything looks like fixed: sf plugins install @salesforce/plugin-packaging@latest sf plugins reset --reinstall --hard
I'll close this issue
Summary
In CI/CD after the metadata was deployed to scratch org when running apex tests it is error saying "Error (1): Always provide a classes, suites, tests, or testLevel property."
Command we are using to run apex unit tests is: sf apex run test -o $username -l RunLocalTests -c -r junit -w 90 -d ./tests/apex
Username is present because before running a tests I'm writing to debug a string with username variable, so it is always displaying like this: " APEX TESTS FOR test-ntsfcbjiiohi@example.com STARTED "
Actually if restart the pipeline several times it can start running apex unit tests, but there is no concrete number how many times pipeline should be restarted
Expected result
Apex unit tests execution started
Actual result
Error (1): Always provide a classes, suites, tests, or testLevel property.
System Information
Which shell or terminal are you using? - powershell