mavdi / grunt-cucumberjs

Grunt plugin for cucumber.js
MIT License
31 stars 36 forks source link

Cannot run some feature from cli (Ubuntu) #98

Open ThaKing opened 7 years ago

ThaKing commented 7 years ago

OS: Ubuntu 16.04 From Windows 10 - everything OK

package.json

"cucumber": ">=1.3.1",
    "grunt": "~1.0.1",
    "grunt-cli": "~1.2.0",
    "grunt-cucumberjs": ">=0.10.12",
    "protractor": ">=4.0.14",
    "exceljs": ">=0.2.39"

nodeVersion = v7.3.0 npmVersion = 3.10.10

run from cli grunt cucumberjs --features=src/test/features/some.feature

output

Running "cucumberjs:src" (cucumberjs) task
 /home/user/tests-ui-js/node_modules/fs-finder/lib/Base.js:33
         throw new Error("Path " + directory + " is not directory");
         ^
 Error: Path /home/user/tests-ui-js/src/test/features/notes.feature is not directory
     at Finder.Base (/home/user/tests-ui-js/node_modules/fs-finder/lib/Base.js:33:15)
     at new Finder (/home/user/tests-ui-js/node_modules/fs-finder/lib/Finder.js:23:43)
     at Function.Finder.from (/home/user/tests-ui-js/node_modules/fs-finder/lib/Finder.js:34:15)
     at getFeatures (/home/user/tests-ui-js/node_modules/cucumber-parallel/lib/tasker/tasks.js:40:31)
     at Object.getTasks (/home/user/tests-ui-js/node_modules/cucumber-parallel/lib/tasker/tasks.js:78:15)
     at EventEmitter.<anonymous> (/home/user/tests-ui-js/node_modules/cucumber-parallel/lib/parallelizer/parallelizer.js:48:23)
     at emitNone (events.js:86:13)
     at EventEmitter.emit (events.js:185:7)
     at EventEmitter.<anonymous> (/home/user/tests-ui-js/node_modules/cucumber-parallel/lib/parallelizer/parallelizer.js:35:22)
     at emitNone (events.js:86:13)
     at EventEmitter.emit (events.js:185:7)
     at Object.invoke (/home/user/tests-ui-js/node_modules/cucumber-parallel/lib/parallelizer/parallelizer.js:103:22)
     at Object.<anonymous> (/home/user/tests-ui-js/node_modules/cucumber-parallel/bin/cucumber-parallel:3:16)
     at Module._compile (module.js:541:32)
     at Object.Module._extensions..js (module.js:550:10)
     at Module.load (module.js:458:32)
mavdi commented 7 years ago

Seems to be a problem with your Gruntfile. Can you post the bit relevant to the plugin here?

ThaKing commented 7 years ago
module.exports = function(grunt) {
    grunt.initConfig({
        cucumberjs: {
            src: ['src/test/features/'],
            options: {
                format: 'html',
                output: 'target/cucumber-reports/test-report.html',
                theme: 'bootstrap',
                debug: false,
                executeParallel: true
            }
        }
    });

    grunt.loadNpmTasks('grunt-cucumberjs');
};
  "dependencies": {
    "async": ">=2.1.2",
    "chai": "~3.5.0",
    "moment": "~2.15.2",
    "xmlhttprequest": "~1.8.0",
    "xml": ">=1.0.1"
  },
  "devDependencies": {
    "cucumber": ">=1.3.1",
    "grunt": "~1.0.1",
    "grunt-cli": "~1.2.0",
    "grunt-cucumberjs": ">=0.10.12",
    "protractor": "^4.0.14",
    "exceljs": ">=0.2.39"
  }

That's all. Same code works on Windows

gkushang commented 7 years ago

Can you try running with executeParallel: false ?

ThaKing commented 7 years ago

Yeah, no error appear when I set executeParallel: false