-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Is there a way to run a single test from the command line? #164
Comments
You can run a single file with Running a single test is currently unsupported - looking forward to it.only support in Jasmine 2.0. |
For posterity, Jasmine 2 has been released: https://github.com/pivotal/jasmine/releases/tag/v2.0.0 |
So is there a way to run a single test from the protractor command line, now that Jasmine 2 is out? |
See notes on difficulties updating to Jasmine 2 here: #362 And for the record, it doesn't support it.only :( |
So... now that it is supported in Jasmine 2.0: how is this done with Protractor? |
For anyone looking to do this in Jasmine 2.0+, use ddescribe or iit to isolate a single describe() or it() function. I couldn't find this documented anywhere, but discovered it via this StackOverflow question |
For Karma now you have to use fdescribe or fit ('f' is for focus). How ever in the protractor context nothing is working... |
Without fit and xit how can we run single test in protractor? |
Don't know from the command line, but you can do it using the API like this
|
Hi All, @juliemr Is it possible to run a single test or group of tests (not complete file) in protactor from command line ? I tried using --grep option , but it is not working . Note : Using framework: 'jasmine2' |
@sumittech17 |
@Xotabu4 However I am not able to add GREP option in gruntfile now . |
@Xotabu4 Thank you so much ... that worked for me !!!! |
In my test suite I have nested Basically before/after hooks run event though the test itself is skipped. Anyone else finding this inconvenient? |
Hi @sakovias, I am having the same issue on with using --grep. Did you happen to find any solution to skip beforeAll for spec that does not match the grep value? |
This is what working for me, if i want to run a particular 'it' block from a particular suit protractor protractor.conf.js --suite test-suite-name --grep="it-block-name" |
You can do all that, but I found way more convenient to have a wrapper script that basically inject the files I want to test on the protractor.config.ts. Then I write one test per file and use a common sense naming convention like: user/create-article.e2e.ts So now I can run things like ./run-e2e.sh user/create Sometimes is easier to build things yourself ... |
For sure it will work I didn't think it is good way to achieve it as if one have to change any config.js property he/she have to in all three places. More configuration file more will be the fragility. |
I'd like to pass in a single test name to run from the command line. Is this possible? (new to jasmine/protractor, any help would be appreciated)
The text was updated successfully, but these errors were encountered: