Run selenium tests and Run server+web local

Hi,
I’m trying to run npx cucumber-js on /hollaex-kit/test/selenium/Scenario. There seems to be an error with the step definitions. I already installed cucumber and chrome driver.

➜ Scenario git:(develop) ✗ npx cucumber-js
Error: ENOENT: no such file or directory, open ‘D:/GitHub/mahdi-kit/test/selenium/Onboarding/.log/Promotion/log.txt’
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at Object. (/Users/emilianosomoza/hollaex-kit/test/selenium/Scenario/features/step_definitions/stepdefs.js:7:19)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at /Users/emilianosomoza/hollaex-kit/test/node_modules/@cucumber/cucumber/lib/cli/index.js:122:17
at Array.forEach ()
at Cli.getSupportCodeLibrary (/Users/emilianosomoza/hollaex-kit/test/node_modules/@cucumber/cucumber/lib/cli/index.js:120:26)
at Cli.run (/Users/emilianosomoza/hollaex-kit/test/node_modules/@cucumber/cucumber/lib/cli/index.js:145:41)
at async Object.run [as default] (/Users/emilianosomoza/hollaex-kit/test/node_modules/@cucumber/cucumber/lib/cli/run.js:25:18)
codepath: /Users/emilianosomoza/hollaex-kit/test/selenium/Scenario/features/step_definitions/stepdefs.js
UUUU

Failures:

  1. Scenario: Discount fee manipulation by admin for [email protected] # features/promotion.feature:5
    ? Given Admin logged in
    Undefined. Implement with the following snippet:

      Given('Admin logged in', function () {
        // Write code here that turns the phrase above into concrete actions
        return 'pending';
      });
    

    ? When Admin adjust the discount rate
    Undefined. Implement with the following snippet:

      When('Admin adjust the discount rate', function () {
        // Write code here that turns the phrase above into concrete actions
        return 'pending';
      });
    

    ? And Discount rate is in the range of Zero to hundred
    Undefined. Implement with the following snippet:

      When('Discount rate is in the range of Zero to hundred', function () {
        // Write code here that turns the phrase above into concrete actions
        return 'pending';
      });
    

    ? Then The user profile page should present the discount rate
    Undefined. Implement with the following snippet:

      Then('The user profile page should present the discount rate', function () {
        // Write code here that turns the phrase above into concrete actions
        return 'pending';
      });
    

1 scenario (1 undefined)
4 steps (4 undefined)
0m00.004s (executing steps: 0m00.000s)
┌──────────────────────────────────────────────────────────────────────────────┐
│ Share your Cucumber Report with your team at https://reports.cucumber.io
│ │
│ Command line option: --publish │
│ Environment variable: CUCUMBER_PUBLISH_ENABLED=true │
│ │
│ More information at Environment Variables - Cucumber Documentation
│ │
│ To disable this message, add this to your ./cucumber.js: │
│ module.exports = { default: ‘–publish-quiet’ } │
└──────────────────────────────────────────────────────────────────────────────┘

Also, I would like to run server and web local to make it easier to start making some changes. Is it possible to run outside docker?

Thanks!

1 Like

After you set up your exchange and configure .env based on your domain, you need to have a mailbox that receives all your fictitious user emails, and these tests are compatible with Amazon WorkMail.
Please run the selenium tests first, and then some log files will be recorded on your local machine. The tests are in onboarding, wallet, trade, and role. Gherkin will check those log files.

This version is compatible with Chrome 95+. Meanwhile, you can run these selenium tests on any server. So the testing is divided into two parts; the first one is selenium, which like a robot, walks through many pages and runs the test cases, then produces log files. The second part is Cucumber which checks the logs based on the scenarios.

1 Like