Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easily debug initial test run #173

Closed
nicojs opened this issue Nov 8, 2016 · 4 comments
Closed

Easily debug initial test run #173

nicojs opened this issue Nov 8, 2016 · 4 comments
Labels
🚀 Feature request New feature request

Comments

@nicojs
Copy link
Member

nicojs commented Nov 8, 2016

We need a way to debug the initial test run more easily. Right now its a pain.

Take this workflow for example:

  1. Rerun stryker using logLevel: 'trace'
  2. Lookup the karma config it prints to the console
  3. Shut down Stryker
  4. Move the karma config to a seperate karma.conf.js file
  5. Change reporters to include the 'progress' reporter.
  6. Run karma on the newly created config. Interpret what the issue is. Fix and rerun.
  7. Alter stryker.conf.js and start again from 1.

Once we have this feature: #171 we could add a debug command for example.

The debug command should:

  1. Print log messages from the test runner.
  2. Give the user the possibility to inspect the test runner (the browser if you're using karma).

In order for 1 to work, we should run the testrunner in the same process as Stryker. No isolation into a separate process.

In order for 2 to work, we should notify the test runner that it is ran with the debug command (command: 'debug' or something). The stryker-karma-runner could than load the test run with singleRun: false` for example, keeping the browser open.

@sharikovvladislav what do you think of this proposal? Would this be helpful enough for you?

@sharikovvladislav
Copy link
Contributor

I can debug unit tests which are using karma runner in IDEA/WebStorm (like any other nodejs/grunt/gulp/etc application). I just put breakpoint in code, run debug and . Will I be able to do it after this implementing this feature?

@nicojs
Copy link
Member Author

nicojs commented Nov 8, 2016

Ah yes, you probably will. It will be the same process as Stryker runs in, so running stryker with the debugger might just do the trick. Not sure though, we'll have to see.

@simondel
Copy link
Member

@nicojs Stryker will now suggest rerunning when it fails unexpectedly. Can we close this?

@nicojs
Copy link
Member Author

nicojs commented Feb 13, 2019

It might we worth it to introduce a --runInBand flag (like jest's --runInBand).

If anyone wants this feature, please comment here, so we can reopen it.

@nicojs nicojs closed this as completed Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature request New feature request
Projects
None yet
Development

No branches or pull requests

3 participants