Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see what Protractor tests is currently executing?

In my Protractor test script, I use the usual notation:

describe("mytest") {
    ...
    it(" should do this") {
    ... 
    it(" should do that") {

I would like to be able to see what test and what part of each is currently running when I run them. Is there any option I can use to output test descriptions to the console?

like image 316
More Than Five Avatar asked Mar 06 '14 12:03

More Than Five


People also ask

Which command is used to run the protractor test cases in command prompt?

I did exact settings above and executed below command "npm run protractor -TESTED=testcaseone".

How do you run a protractor test in Visual Studio code?

Run Protractor Test(s) In VS Code project explorer, right click on a . ts file and choose option Protractor: Run test(s) . Press F1 and select the command with title: Protractor: Run test(s) . This will run Protractor on selected typescript file.


2 Answers

There is a reporter that should do what you are looking for. Take a look at https://www.npmjs.com/package/jasmine-spec-reporter and https://github.com/bcaudan/jasmine-spec-reporter/tree/master/examples/protractor

like image 90
Svetozar Misljencevic Avatar answered Oct 04 '22 15:10

Svetozar Misljencevic


You can use the --verbose option to print more information about your tests, but it will not tell you which test is currently being run.

I suggest you to create an issue if you want that feature. https://github.com/angular/protractor/issues/new

$ ./node_modules/protractor/bin/protractor protractor-config.js --verbose

------------------------------------
PID: 7985 (capability: chrome #1)
------------------------------------

Using the selenium server at http://localhost:4444/wd/hub

angularjs homepage
    should greet the named user

    todo list
        should list todos
        should add a todo

Finished in 5.915 seconds
3 tests, 5 assertions, 0 failures
like image 23
Andres D Avatar answered Oct 04 '22 16:10

Andres D