I have a very large number of Describe blocks in my Protractor tests. I get pages and pages of test output all correctly indented but it's difficult to see which test is which and how far the tests have progressed.
Has anyone tried to add a list numbering to the Describe. Something like this:
1. Main Page test
1.1 Test xxx
1.2 Test yyy
1.2.1 Describe in describe in describe test
2. XXX Page test
2.1 Test abc
Note that here the first and maybe second number after dots would be a result of describes with describes.
Protractor works with AngularJS versions greater than 1.0. 6/1.1. 4, and is compatible with Angular applications. Note that for Angular apps, the binding and model locators are not supported.
As mentioned above, Spec file in protractor is kind of a feature file in BDD, Describe-block is a feature in the feature file. Describe is a function in jasmine it takes two parameters namely a string and a function. The first parameter is a string which can be the name of your Collection of Specs or a Feature.
Files required by Protractor The test code is written by using the syntax of our testing framework. For example, if we are using Jasmine framework, then the test code will be written by using the syntax of Jasmine. This file will contain all the functional flows and assertions of the test.
You can use jasmine spec reporter (>= 1.1.0) with the displaySuiteNumber option to display the output of your protractor tests.
Output example:
1 first suite
✗ should failed
- Expected true to be false.
✓ should be ok
2 second suite
✗ should failed
- Expected true to be false.
✓ should be ok
2.1 first child suite
2.1.1 first grandchild suite
✗ should failed
- Expected true to be false.
- Expected true to be false.
✗ should failed
- Expected true to be false.
✓ should be ok
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With