Comments (7)
@randi274 Well in this case I thought the org had tests but it didn't. But the error message tells me I did something wrong on the command line (I didn't specify a test level, test suite, or list of tests) when in fact the "error", if you want to call it that, was that there were no (local) tests on the org. A good error message not only tells the user what's wrong, but also gives some indication as to how to fix it.
So I think it just avoids confusion when you tell the user what the actual problem is instead of confusing them by saying they need to specify a test level when they did specify a test level.
If I say rm bla
on the command line, I get an error that says rm: bla: No such file or directory
. It doesn't say rm: You have to specify a file to unlink
. So I think it's reasonable to expect the same from the Salesforce CLI.
Hope this helps!
from salesforcedx-apex.
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.
from salesforcedx-apex.
please uninstall the salesforcedx plugin and try again. That makes a bunch of your CLI commands, including apex, out of date by months.
sfdx plugins:uninstall salesforcedx
from salesforcedx-apex.
OK, tried that but the result is the same.
However, I think the problem might be that the org I'm testing against has no local tests. So it might be a case of needing a clearer error message -- or just accepting the fact that in an org with no tests, running all local tests means running no tests, which is absolutely fine: if I ask you to give me all your Ferraris and you give me zero, that's probably because you don't have any Ferraris ;-)
I'll update the issue title and description.
from salesforcedx-apex.
I'm transferring to the repo that tracks issues for all apex:*
commands
from salesforcedx-apex.
@fransf-wtax I was able to reproduce the error message, but can you provide us a little more detail as to why you would be running this command in an org without tests? (If I omit the -l
parameter, I still encounter the issue!). That will help us figure out prioritizing this issue. I also am not finding this error in any of our extension or libraries, so I think this might be something that we're getting back upstream from Salesforce proper.
from salesforcedx-apex.
Thanks for the additional information @fransf-wtax! @smaddox-sf this would be a product question on how we should handle it - this is an error message that we get back from core, so we could provide a check for orgs without tests, handle the error message more politely, or leave it as-is as a somewhat confusing message.
from salesforcedx-apex.
Related Issues (20)
- force:apex:test:run does not seem to take the wait parameter into account HOT 5
- "sfdx force:apex:test:run" and "sfdx force:apex:test:report" generate invalid XML when using JUNIT output
- Add cobertura report format for force:apex:test:report command HOT 3
- The new code coverage formats also for force:apex:test:* HOT 2
- Class names returned for a namespaced package are in the format of `namespace__classname`. They should be `namespace.classname`
- Publish job fails with timeout error on git tag step
- force:apex:test:run with codecoverage enabled resulting in Apex Unit Test failures
- sfdx force:apex:log:tail -d DEBUGLEVEL ignores the specified debug level HOT 1
- Missing classes in coverage report generated from sfdx force:apex:test:run HOT 15
- Test id no longer being reported for current version of Apex Plugin HOT 1
- sfdx force:apex:test:run fails when run from Github action HOT 6
- What is the formal specification for the output files generated by force:apex:test:run ? HOT 2
- sfdx force:apex:test:report -c has no option to display code coverage without details HOT 2
- force:apex:test:run can throw "CLIError: timed out" beginning in v1.6 (CLI v7.185) HOT 6
- `sfdx force:apex:test:run` failing to execute 2+ test methods from same class HOT 6
- Test summary start time in locale causes issues with junit reporter HOT 1
- feat: Support readablestream for getLogs in the logservice
- Cannot read properties of null (reading 'replace') when trying to retrieve Apex Test results HOT 4
- sfcli apex test run command is throwing an error "Error (10): Cannot read properties of undefined (reading 'Status')" HOT 6
- No detailed code coverage when using junit output format
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from salesforcedx-apex.