selenium-ide icon indicating copy to clipboard operation
selenium-ide copied to clipboard

selenium-side-runner No tests found, exiting with code 1

Open mixulidio opened this issue 2 years ago • 7 comments

No tests found, exiting with code 1 Run with --passWithNoTests to exit with code 0 No files found in C:\Program Files\nvm\v16.17.0\node_modules\selenium-side-runner. Make sure Jest's configuration does not exclude this directory. To set up Jest, make sure a package.json file exists. Jest Documentation: https://jestjs.io/docs/configuration Files: "C:\progra~1\nvm\v16.17.0\node_modules\selenium-side-runner\dist\main.test.js"

{ "id": "12d70a4d-f0e6-40dd-9cd3-293f0c255ba9", "version": "2.0", "name": "test", "url": "https://www.google.com", "tests": [{ "id": "a2b75cbd-7ec5-43af-9e98-528cfd9d2d9a", "name": "test", "commands": [{ "id": "6292a107-1de3-4119-a166-262aa26939da", "comment": "", "command": "open", "target": "/", "targets": [], "value": "" }] }], "suites": [{ "id": "f685240e-7d02-4db1-a6f0-6195a22b2f45", "name": "Test", "persistSession": false, "parallel": false, "timeout": 300, "tests": ["a2b75cbd-7ec5-43af-9e98-528cfd9d2d9a"] }], "urls": ["https://www.google.com/"], "plugins": [] }

mixulidio avatar Apr 12 '23 23:04 mixulidio

How are you calling this? Can I see an example CLI command?

toddtarsi avatar Apr 13 '23 00:04 toddtarsi

How are you calling this? Can I see an example CLI command?

selenium-side-runner prjteste.side

mixulidio avatar Apr 13 '23 12:04 mixulidio

npm install -g selenium-side-runner

npm install -g chromedriver

selenium-side-runner /path/to/your-project.side

nvm version: 1.1.9 Node: 16.17.0 Package Manager: npm 8.15.0 OS: Windows 10 Pro x64

My frist problem: 'C:\Program' is not recognized as an internal or external command

I solved like this: __dirname = __dirname.replace("C:\Program Files\", "C:\progra~1\"); in file: C:\Program Files\nodejs\node_modules\selenium-side-runner\dist\bin.js

but now....

No files found in

mixulidio avatar Apr 13 '23 12:04 mixulidio

So, please help me understand. Is it basically that it doesn't handle filepaths on Windows with spaces well?

toddtarsi avatar Apr 13 '23 13:04 toddtarsi

So, please help me understand. Is it basically that it doesn't handle filepaths on Windows with spaces well?

Yes, my first issue was with the spaces.

But now, I can't run

does not find the test.

mixulidio avatar Apr 13 '23 17:04 mixulidio

I had the same problem here, and after a few tries I realized that the error occurs due case-sensitivity in Windows paths. My build workspace in Jenkins was configured in c:\jenkins\workspace, and therefore it was not working. So I changed it to C:\jenkins\workspace (note that the drive name is now capitalized), and after that it started working as expected.

fabio-couto avatar Nov 06 '23 20:11 fabio-couto

I have exactly the same problem but only with 4.0.x - it was fine in 3.17.0. I setup a new project installed side runner and chromedriver.

The command .\node_modules.bin\selenium-side-runner -c "browserName=chrome chromeOptions.args=[disable-infobars,disable-blink-features=AutomationControlled,disable-gpu,no-sandbox]" -s http://localhost:4444/wd/hub "C:\Daten\www\webdriver\test\specs\test.side"

I spent hours on trying to find the problem - unfortunatly without success.

No tests found, exiting with code 1 Run with --passWithNoTests to exit with code 0 No files found in C:\Daten\www\side\node_modules\selenium-side-runner. Make sure Jest's configuration does not exclude this directory. To set up Jest, make sure a package.json file exists. Jest Documentation: https://jestjs.io/docs/configuration Files: "c:\Daten\www\side\node_modules\selenium-side-runner\dist\main.test.js"

larstippmann avatar Apr 23 '24 04:04 larstippmann