Closed redboul closed 9 years ago
Hi Julien, sorry to hear about the trouble you're having. I'll look into it on Friday (my day off for working on projects like this one). Or are you in a hurry?
Can't see much wrong there. Could you send your karma.conf file?
Hi Julien,
When nothing seems to be tested, but no errors are shown either, there is usually something wrong with the configuration of your spec files. I do not know exactly what is causing the problem here, but you could try a few things:
specs
config (currently '**/*.spec.js'
) with the more specific 'test/spec/**/*.spec.js'
options.karma.fileSpecs
configuration (this is now auto-generated anyways)test/spec/**/*.js
in the code
configuration. Even though including the spec files twice should not result in any errors, it is not needed to include them here, and might be better to remove them.Could you also provide us with the output of running npm ls -depth 1
in your project root, and maybe even the full output of running grunt mutationTest:all
? And are you using the latest and greatest version (1.1.0), or a slightly older one?
Thanks! -Jimi
Hi,
thx for your time.
yes, I'm using the 1.1.0 version of the project.
here is the result of the npm ls -depth 1
: npm.ls.out
here is the output of the grunt mutationTest:all
command: grunt.mutationTest.all.out
the full project is available here bonita-portal-js - branch mutation test
I will try to inspect code to check what is done (if I find enough time)...
BR
Julien
Hi Julien,
Sorry for not responding earlier. We haven't really had a lot of time to work on the project lately.
I quickly looked at your project though, and first thing I noticed was that, even without mutations, some tests were failing. Maybe I did something wrong, but in order for grunt-mutation-testing to work properly, all tests need to be passing without applying mutations.
Secondly, I found that there is also a problem with the generation of the Karma coverage files. I haven't been able to pinpoint exactly what's wrong, but that problem might have something to do with the order in which you load/specify your javascript files in the configuration object.
-Jimi
ok, thanks for your answer (been busy too, sorry).
I cleaned up the project from my test settings and now all tests pass using grunt test
(it seems that using Chrome with karma makes tests fail)
I updated the branch from the master and now karma test files are injected using wiredep. Maybe the order is cleaner now.
Hi Julien,
I finally figured it out! At first, nothing seemed wrong with your confguration; you configured the location of your code files, your spec files, and a file you wished to mutate. The only thing you are missing here is the libraries that are needed to run your code (i.e. bower dependencies). Basically, the code
configuration option should contain all files needed to run your project, which is usually the content of the files
configuration option in your Karma config file minus the spec files. Copying over that configuration and removing the spec files, I got the mutation testing working for your project.
Now, of course, we should have something in place to warn you about an incomplete configuration. I have created issue #37 to fix this (as we should already have that in place, but apparently it's not working anymore or has never really worked at all).
This issue will now be closed, as the specific case has been solved and the underlying cause will be tracked in a different issue.
-Jimi
Hi all,
I used to make 0.5.1 work last year and I wanted to use the mutation test again with the new version. I succeeded in having the grunt task set up but it seems nothing is tested. Here is the task definition I used :
where the test/spec/mapping.spec.json looks like this :
The karma.conf.js is correct because when I run karma the 500 tests pass (it uses jasmine test framework by the way).
Can you give me hint about this?
I will update the Readme consequently.
Thx