Selminha / testlatte

TestLatte allows you to Debug or Run your TestCafé tests on visual studio code.
https://marketplace.visualstudio.com/items?itemName=sshimono.testlatte
MIT License
7 stars 3 forks source link

Couldn't execute Testcafe tests #12

Closed geeksreeni closed 3 years ago

geeksreeni commented 3 years ago

Hi while executing testcafe testing from testlatte below are the errors: seneca@sreenis-ubuntu:~/Sreenivas/Cy_CodeBase/Cyglass-UI-Automation$ cd /home/seneca/Sreenivas/Cy_CodeBase/Cyglass-UI-Automation; npx --no-install /home/seneca/Sreenivas/Cy_CodeBase/Cyglass-UI-Automation/node_modules/testcafe/bin/testcafe.js chrome /home/seneca/Sreenivas/Cy_CodeBase/Cyglass-UI-Automation/UI/tests/Navigations/LoginPageTests.ts --test "Successful Login Verification Test" npm ERR! code ENOTDIR npm ERR! syscall open npm ERR! path /home/seneca/Sreenivas/Cy_CodeBase/Cyglass-UI-Automation/node_modules/testcafe/bin/testcafe.js/package.json npm ERR! errno -20 npm ERR! ENOTDIR: not a directory, open '/home/seneca/Sreenivas/Cy_CodeBase/Cyglass-UI-Automation/node_modules/testcafe/bin/testcafe.js/package.json'

in command line i could execute the tests.

my configurations: image

Selminha commented 3 years ago

Hello, Are you using testcafe installed locally or globally?

geeksreeni commented 3 years ago

tc installed globally and locally below is the package.json { "name": "ui-automation", "version": "1.0.0", "description": "UI Auomation Project", "main": "index.js", "scripts": { "test-dev-smoke": "testcafe tests/ --environment=dev --test-meta smokeTest=true", "test-dev-regression": "testcafe tests/ --environment=dev --test-meta regressionTest=true", "test-staging-smoke": "testcafe tests/ --environment=staging --test-meta smokeTest=true", "test-staging-regression": "testcafe tests/ --environment=staging --test-meta regressionTest=true" }, "author": "Sreenivas Parimi", "license": "ISC", "devDependencies": { "@elastic/elasticsearch": "^7.13.0", "axios": "^0.21.1", "testcafe": "^1.14.2" } }

geeksreeni commented 3 years ago

@Selminha can you help me on this.

Selminha commented 3 years ago

Can you send the path your testcafe is installed?

Selminha commented 3 years ago

You said that you can execute the tests in the command line, can you send the command line that is working?

geeksreeni commented 3 years ago

As my package.json has scripts test-dev-smoke npm run test-dev-smoke is working for me on command line

Selminha commented 3 years ago

As my package.json has scripts test-dev-smoke npm run test-dev-smoke is working for me on command line

Have you tried to put the command line arguments on the testlatte configuration? If not you need to go to testlatte settings->custom arguments->edit in settings.json And in the json you put your arguments (--environment=dev --test-meta smokeTest=true) in the testlatte.customArguments, like the images below.

Please let me know if it works.

Custom arguments Custom arguments json

geeksreeni commented 3 years ago

I have tried it, but no luck. below is settings.json image

here is the error screenshot: image

Tc is executing with: Using locally installed version of TestCafe.

Selminha commented 3 years ago

Hi, Sorry I couldn't reproduce your issue and find exactly what is happening, I'm thinking it can be a issue with packages version, I have updated all the packages of testlatte and published a new version, please try to run with this new version and let me know if it works.

Best Regards.

Selminha commented 3 years ago

Close for inactivity.