Protractor fail all tests in test suite - testing

Protractor sometimes fail all tests (test suite) if it can't find a element(simple find or protractor.ExpectedConditions) in a single test.
Is it ok?
https://www.screencast.com/t/66NqRQQCBj
https://www.screencast.com/t/Q9tBu4lD
Is there a possible workaround?

Related

How to save folder as a suite in Pycharm

I am using Pycharm for my robot framework tests.
I have different folders for different test scripts.
After running every folder testscripts I got result files. (Log and output.xml)
When I run robotmetrics I received below results where the number of suite and test script are same.
Ideally test suite number should always be one and test scripts number should be according to number of tests in that suite.
Here I am getting same numbers for test suite and test case.
In below example test suite is search and having two test scripts in it but suite statistics is showing two though I have run one test suite.

Is it possible to run all the tests using mocha even if there are some failures?

I am working on a node.js application and would like to know if there is a way I can run all the unit tests from all the sub modules even if there are some test failures to know how many tests are failing in total to start putting the fixes for them. We use mocha for our tests on the back-end and jest for the ui.
Thanks.
The default behavior for mocha is to run all the tests. If it is exiting after the first test failure, that would suggest that you are using the "bail" option typically enabled on the command line with either --bail or -b.
Relevant docs: https://mochajs.org/#-bail-b
It can also be caused by passing the option { bail: true } to mocha.setup(). Look in your test runner and in your package.json.
Lastly, the least likely of these possibilities is that it could also be caused by using this.bail() somewhere in the Mocha test runner.

Run specific tests within test suite - Selenium Side Runner (IDE)

Is it possible to run a specific test within my selenium side runner test suite? For example, within a test suite, my first test logs me into a website, then the other tests, test specific areas of the website. Each of these tests first inherit the login test to auth the "user" when running the tests. But when I run the suite, it runs the tests in order, so it will first run the login test, then rerun the login test within my other tests. Hope this makes sense. So essentially i want to be able to specify which tests to run within my test suite. Thanks in advance
You may use the filter to run tests that have a common name:
Filter tests
You also have the option to run a targeted subset of your tests with the --filter
target command flag (where target is a regular expression value). Test names that
contain the given search criteria will be the only ones run.
[example] selenium-side-runner --filter smoke

How to run only failed tests (protractor+jasmine)

We have ~150 e2e tests and executing in multiple browsers like chrome, firefox, IE, Edge & Safari. Few tests are failing on different reasons. Is it possible to execute only failed tests using protractor?
Yes, You can use protractor-flake => https://www.npmjs.com/package/protractor-flake
It's able to rerun whole spec files. You actually can provide a parser which receives all test output. We use this and it's very helpful.

Selenium Grid Setup for the Test cases those does not contains annotations

I have different Test Suite but those does not contains either TestNG or Junit Annotation. I am aware of about the steps how to Run the HUB and NODE.
Since My WebDriver Test scripts does not contains Annotations, how to trigger the execution ?