0

i'm using wdio with cucumber frameworh, i have 2 .feature files and two test cases .js, maxInetances 10 , when i trigger the test and for a briev moment two blank chrome instances are opened then one of the two is closed and the test begin executing on the remaining instance, the two test cases contain the same code the only difference is the content of the Given When Then in the log there is a test which succeed and the second fails without any additional detail and when i run each test on its own they work. any siggestion ?

mehdi
  • 47
  • 3
  • 10

2 Answers2

0

last time i did something and it worked but then i tried with another project with two different test cases and it fails again, here are the configuration files :

in the features file i have scenario1.feature and scenario2.feature and in the test file i have scenario1.test.js and scenario2.test.js

the problem is that the log output tells only that all the steps were skipped and tells nothing about the error , it just say "failed in chrome"

package.json and wdio.conf.js files

mehdi
  • 47
  • 3
  • 10
0

I am not quite sure I understand your issue, but when i checked your conf file, i see that you are missing tagExpressions. So i guess since no tags specified, wdio might have skipped all.

Please try adding the scenario tags to tagExpression in the cucumberOpts object.

  • Hi Naveen, the problem was that when i trigger the "npm test" the two browser start but immediatly crashes even before the base url was set and in the logoutput all the steps was marked as skipped, and i found why, it can appeare stupid but for a begginer in the nodejs domain it's not obvious, the reason was that the two feature files was containing the same background steps, considering the fact that the cucumber framework executes the files step by step and as the background steps were identical in the two files it couldent tell which feature file goes with which test case – mehdi Jan 11 '20 at 15:54