iamchrismiller / grunt-casper

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

Fix for series testing broken #21

Closed YukonSaint closed 10 years ago

YukonSaint commented 10 years ago

This seems to have solved the problem.

iamchrismiller commented 10 years ago

look at comment : https://github.com/iamchrismiller/grunt-casper/issues/20#issuecomment-32553134

You need a src array in a files hash.

YukonSaint commented 10 years ago

FYI I have the src array now and it still only runs one test. Any idea what I'm doing wrong?

casper : {
  options : {
    test : true,
    includes: 'app/shared/test/setup.js',
    parallel : false,
    "fail-fast": false,
    concurrency : 10,
    'log-level' : 'warning',
  },
  files : {
    src: [
      // "app/entertainment/**/playlist.test.js",
      "app/entertainment/**/*.test.js",
      "app/shared/test/goldenpath.test.js",
      "app/shared/test/loggedInPath.test.js"
      // "app/entertainment/details/**/*.test.js",
    ]
  }
},

grunt.registerTask('integration', 'Run integration tests', [ 'testENV', 'testServer', 'casper:files' ]);

iamchrismiller commented 10 years ago

I was able to run a test scenario with the above configuration without any issues...

I would recommend doing something like this.

casper : { options : { ... }, client : { files { src : [...] } } }

This is taking advantage of grunts MultiTask. Using files directly as a task is a little confusing. Trying Running grunt with --verbose so you can get a little more insight into what is happening when the task runs.