Not able to run stryker with a really simple spec
See original GitHub issueHi
I am using stryker with karma runner and jasmine. Here is my config file
module.exports = function(config) {
config.set({
// list of files / patterns to load in the browser
files: [
'./thirdparty/js/require/require-1.0.8.js',
'./tests/CanarySpec.js'
],
// level of logging
logLevel: config.LOG_DEBUG,
testRunner: 'karma',
testFramework:'jasmine',
karmaConfig: {
frameworks: ['requirejs'],
browsers: ['PhantomJS'],
reporter: ['html','progress'],
}
});
};
Here is CanarySpec.
define("tests/CanarySpec",[],function(){
function helloWorld() {
return "Hello world!";
}
describe('Hello world', function() {
it('says hello', function() {
expect(helloWorld()).toEqual("Hello world!");
});
});
});
I am getting following error
> stryker -c stryker.conf.js
[36m[2016-11-10 01:52:34.761] [DEBUG] PluginLoader - [39mLoading plugins stryker-html-reporter (matched with expression stryker-*)
[36m[2016-11-10 01:52:34.761] [DEBUG] PluginLoader - [39mLoading plugins stryker-karma-runner (matched with expression stryker-*)
[36m[2016-11-10 01:52:34.761] [DEBUG] PluginLoader - [39mLoading plugins stryker-html-reporter
[36m[2016-11-10 01:52:34.871] [DEBUG] PluginLoader - [39mLoading plugins stryker-karma-runner
[36m[2016-11-10 01:52:35.822] [DEBUG] Stryker - [39mUsing config: {"testFramework":"jasmine","testRunner":"karma","timeoutMs":5000,"timeoutFactor":1.5,"plugins":["stryker-*"],"port":9234,"reporter":["progress","clear-text"],"files":["thirdparty/js/require/require-1.0.8.js","tests/CanarySpec.js"],"singleRun":true,"karmaConfig":{"frameworks":["requirejs"],"browsers":["PhantomJS"],"reporter":["html","progress"]},"configFile":"stryker.conf.js"}
[36m[2016-11-10 01:52:35.822] [DEBUG] TestSelectorOrchestrator - [39mUsing testSelector jasmine based on `testFramework` setting
[33m[2016-11-10 01:52:35.838] [WARN] InputFileResolver - [39mNo files marked to be mutated, stryker will perform a dry-run without actually mutating anything.
[32m[2016-11-10 01:52:35.838] [INFO] TestRunnerOrchestrator - [39mStarting initial test run. This may take a while.
[36m[2016-11-10 01:52:35.838] [DEBUG] TestRunnerOrchestrator - [39mCreating a sandbox for files in ~\html5\.stryker-tmp\9069590\test-runner-files7967011
[36m[2016-11-10 01:52:35.838] [DEBUG] TestRunnerOrchestrator - [39mCreating test runner 0 using settings {port: 9234, coverageEnabled: true}
[34m[2016-11-10 01:52:36.072] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:36.071] [DEBUG] PluginLoader - [39mLoading stryker-* from ~\html5\node_modules
[34m[2016-11-10 01:52:36.087] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:36.087] [DEBUG] PluginLoader - [39mLoading plugins stryker-html-reporter (matched with expression stryker-*)
[34m[2016-11-10 01:52:36.087] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:36.087] [DEBUG] PluginLoader - [39mLoading plugins stryker-karma-runner (matched with expression stryker-*)
[34m[2016-11-10 01:52:36.087] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:36.087] [DEBUG] PluginLoader - [39mLoading plugins stryker-html-reporter
[34m[2016-11-10 01:52:36.197] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:36.196] [DEBUG] PluginLoader - [39mLoading plugins stryker-karma-runner
[34m[2016-11-10 01:52:37.086] [TRACE] IsolatedTestRunnerAdapter - [39m[32m[2016-11-10 01:52:37.085] [INFO] KarmaTestRunner - [39musing config
....
....
[34m[2016-11-10 01:52:37.694] [TRACE] IsolatedTestRunnerAdapter - [39m[33m10 11 2016 01:52:37.678:WARN [watcher]: [39mPattern "~/html5/.stryker-tmp/9069590/test-runner-files7967011/___testSelection.js" does not match any file.
[34m[2016-11-10 01:52:37.710] [TRACE] IsolatedTestRunnerAdapter - [39m[32m10 11 2016 01:52:37.709:INFO [karma]: [39mKarma v1.3.0 server started at http://localhost:9234/
[34m[2016-11-10 01:52:37.710] [TRACE] IsolatedTestRunnerAdapter - [39m[32m10 11 2016 01:52:37.709:INFO [launcher]: [39mLaunching browser PhantomJS with unlimited concurrency
[34m[2016-11-10 01:52:37.741] [TRACE] IsolatedTestRunnerAdapter - [39m[32m10 11 2016 01:52:37.740:INFO [launcher]: [39mStarting browser PhantomJS
[34m[2016-11-10 01:52:39.348] [TRACE] IsolatedTestRunnerAdapter - [39m[32m10 11 2016 01:52:39.347:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: [39mConnected on socket /#HeVZwJH9cHyEyEcZAAAA with id 26839638
[34m[2016-11-10 01:52:49.602] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:49.585] [DEBUG] PluginLoader - [39mLoading stryker-* from ~\html5\node_modules
[34m[2016-11-10 01:52:49.602] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:49.601] [DEBUG] PluginLoader - [39mLoading plugins stryker-html-reporter (matched with expression stryker-*)
[34m[2016-11-10 01:52:49.602] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:49.601] [DEBUG] PluginLoader - [39mLoading plugins stryker-karma-runner (matched with expression stryker-*)
[34m[2016-11-10 01:52:49.602] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:49.601] [DEBUG] PluginLoader - [39mLoading plugins stryker-html-reporter
[34m[2016-11-10 01:52:49.726] [TRACE] IsolatedTestRunnerAdapter - [39m[36m[2016-11-10 01:52:49.726] [DEBUG] PluginLoader - [39mLoading plugins stryker-karma-runner
[34m[2016-11-10 01:52:50.664] [TRACE] IsolatedTestRunnerAdapter - [39m[32m[2016-11-10 01:52:50.664] [INFO] KarmaTestRunner - [39musing config {"browsers":["PhantomJS"],"frameworks":["requirejs"],"autoWatch":false,"singleRun":false,"detached":false,"reporter":["html","progress"],"files":
.....
.....
[34m[2016-11-10 01:52:51.275] [TRACE] IsolatedTestRunnerAdapter - [39m[32m10 11 2016 01:52:51.274:INFO [karma]: [39mKarma v1.3.0 server started at http://localhost:9234/
[34m[2016-11-10 01:52:51.275] [TRACE] IsolatedTestRunnerAdapter - [39m[32m10 11 2016 01:52:51.274:INFO [launcher]: [39mLaunching browser PhantomJS with unlimited concurrency
[34m[2016-11-10 01:52:51.290] [TRACE] IsolatedTestRunnerAdapter - [39m[32m10 11 2016 01:52:51.290:INFO [launcher]: [39mStarting browser PhantomJS
[34m[2016-11-10 01:52:52.884] [TRACE] IsolatedTestRunnerAdapter - [39m[32m10 11 2016 01:52:52.883:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: [39mConnected on socket /#me0jBb0I_CmAKeanAAAA with id 98884965
[31m[2016-11-10 01:52:52.884] [ERROR] stryker-cli - [39man error occurred [Error: There were failed tests in the initial test run]
Error: There were failed tests in the initial test run
at ~\html5\node_modules\stryker\src\Stryker.js:58:23
at run .....
......
Is there a way to know why tests are failing or any other pointer to diagnose further please?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Discussion: Performance testing · Issue #2434 - GitHub
It is very much possible to execute performance tests on a lower level. We could even make it low level enough that Stryker...
Read more >Configuration | Stryker Mutator
You run stryker from the test project directory. On some dotnet core projects stryker can run without specifying any custom configuration.
Read more >Correct configuration for Stryker on Angular v11 Library project?
I have had no issue with setting up and running Stryker on an application project using default settings for Karma. I am having...
Read more >stryker-mutator/stryker - Gitter
I'm not sure how the mutation tests are run, but I assume you run every mutation in isolation. If you tell jest which...
Read more >Introduction to Mutation Testing with Stryker - Medium
It does not check that our tests are actually able to detect faults in the executed ... can be extremely time consuming and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can confirm it is fixed since 0.5.4. Thanks!
@arpitgautam
A side note: if you’re using
karmaConfig: { frameworks: ['requirejs'] }
you should not also add'./thirdparty/js/require/require-1.0.8.js',
to your files. The karma configuration will provide requirejs for you.