iamchrismiller / grunt-casper

Run CasperJS Scripts/Functional Tests
Other
69 stars 38 forks source link

Parallel Test results clobber each other #70

Open dzwarg opened 9 years ago

dzwarg commented 9 years ago

Hello,

I am experimenting with the parallel testing feature, and I can't seem to get parallel tests to generate xunit output for each of my tests. I would like the parallel tests to either drop individual test result files, or to collect all the parallel test results into one file, but the current test results only contain the last running test.

I have the following test files:

My configuration looks like:

    grunt.config('casper', {
        options: {
            test: true,
            includes: 'test/common.js'
        },
        incoming: {
            options: {
                parallel: true,
                concurrency: 2
            },
            files: {
                'xunit/page-results.xml': ['test/*_test.js']
            }
        }
    });

During my run, it looks like the parallel runner runs the tests in the sequence:

  1. (batch 1)
    • test/page1_test.js
    • test/page2_test.js
  2. (batch 2)
    • test/page3_test.js
    • test/page4_test.js

Since my test/page3_test.js takes longer, the only results in the test results file (xunit/page-results.xml) are for the single test of test/page3_test.js.

Can the files setting support a template or function as the destination, so that parallel test results don't clobber each other?

Thank you!