question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature-req] watch tests and auto-reload on change (like chimp); Don't shutdown the browser

See original GitHub issue

What are you trying to achieve?

I’m trying to get a realtime feedback for quicker test development cycle. Just like chimp where:

  1. Browser stays open after tests are run
  2. Tests are re-run when the test files change
  3. auto manage selenium server and browser drivers
  4. Auto installs dependencies

What do you get instead?

No realtime feedback on test writing

  1. Browser shuts down after each run
  2. Have to manually re-run tests
  3. Need to start selenium manually
  4. Need to install helpers manually (even though it’s mentioned during init)

Provide console output if related. Use --verbose mode for more details.

# paste output here

Provide test source code if related

// paste test

Details

  • CodeceptJS version: 0.5.1
  • NodeJS Version: v6.10.2
  • Operating System: win 10 pro x64
  • Protractor || WebDriverIO || Nightmare version (if related): webdriverio: 4.6.2
  • Configuration file:

codecept.json

{
  "tests": "./feature/*.js",
  "timeout": 10000,
  "output": "./output",
  "helpers": {
    "WebDriverIO": {
      "url": "http://localhost",
      "browser": "chrome",
      "restart": true,
      "windowSize": "maximize",
      "timeouts": {
        "script": 60000,
        "page load": 10000,
        "implicit" : 5000
      }
    }
  },
  "include": {
    "I": "./custom-steps/steps_file.js"
  },
  "bootstrap": false,
  "mocha": {},
  "name": "shaadi-try"
}
# paste suite config here

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:12
  • Comments:8

github_iconTop GitHub Comments

2reactions
elijah-schowcommented, Jun 1, 2018

Almost! This works:

nodemon --exec "codeceptjs run"

Typescript:

I’m using typescript, but nodemon only watches javascript files by default, so I needed to specify a file extension with -e:

nodemon --exec "codeceptjs run" -e ts

Watch a directory

I also wanted to only --watch the test directory

nodemon --exec "codeceptjs run" -e ts --watch src/end-to-end-tests

NPM Script

That’s a lot to type, so I made it an npm script, and now I can run end-to-end tests with:

yarn test:e2e

Or, npm run test:e2e if you’re using npm.

2reactions
spidgornycommented, Jun 1, 2018

In the meantime you can try nodemon codeceptjs run, maybe?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[feature-req] watch tests and auto-reload on change ... - GitHub
I'm trying to get a realtime feedback for quicker test development cycle. Just like chimp where: Browser stays open after tests are run;...
Read more >
Codeception - Bountysource
[feature-req] watch tests and auto-reload on change (like chimp); Don't shutdown the browser $ 0 · 1. Browser stays open after tests are...
Read more >
Cypress - automatically run all tests in browser, with hot reload
The thing is I want the tests in watch/hot-reload mode, to rerun when I change the tests and it'd be nice if they...
Read more >
[ANN] LiveServer: A simple development server with live ...
Open a Browser and go to http://localhost:8000/ to see the content being rendered; try modifying files (e.g. index.html ) and watch the changes...
Read more >
Debugging configurations for Python apps in Visual Studio Code
vscode folder in your workspace. Note: To change debugging configuration, your code must be stored in a folder. To initialize debug configurations, first...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found