Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
148 views
in Technique[技术] by (71.8m points)

javascript - Some Protractor tests are skipped

When I launch protractor conf.js and this file needs to launch multiple spec files (like below), some of them are (randomly?) skipped. It works quite well when I run each spec separately.

  specs: [
    'tests/test-1-*.js',
    'tests/test-2-*.js',
    'tests/test-3-*.js'
  ],

What can I do to run all tests without any being skipped?

question from:https://stackoverflow.com/questions/65840038/some-protractor-tests-are-skipped

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I don't know why this is happening, but if you need to be sure to run all your tests with the same stability than when you run them separately, then you can create a bat file (if you're using Windows) like this:

CALL protractor conf.js --specs='tests/test-1-*.js'
CALL protractor conf.js --specs='tests/test-2-*.js'
CALL protractor conf.js --specs='tests/test-3-*.js'

This will solve the problem until you find the root cause.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...