Unable to run a Test Class
Running a specific test class results in all test methods being ignored. The following is the error in console.
Error 403/Forbidden - INVALID_INPUT: This class name's value is invalid:
Comments (7)
-
reporter -
reporter - changed status to resolved
-
repo owner Hi. Sorry for coming into this late. Did you happen to have a namespace set in
sfdx-project.json
in the original project? Or did the connected org have a namespace? -
reporter There is no namespace in the connected org. I checked the
sfdx-project.json
, there was no namespace set there either. I noticed this issue with running the test class after I had to reopen the project because of the IDE upgrade and I guess something got messed up during that time. I was able to retrieve and deploy without any issue. This is a sfdx project with manifest. -
repo owner Interesting. It sounds like you're in good shape now, but if you do see that behavior ever again, please let me know so I can gather some diagnostic logs and try to understand what's going on. Namespaces should only ever be inferred from the org itself or from the
sfdx-project.json
file. Well, in the OST they're also inferred from the directory structure, but not in the local project sources. Thanks for the additional info... -
reporter Sure. Thanks Scott !
-
repo owner - changed component to Apex Unit Testing
- Log in to comment
Somehow the name of the project gets prefixed to the test class as if it is a namespace and because of that the test classes were being ignored. Since the test classes will not be in the namespace. I created a new project which solved the issue.