1.

What Are Protractor, Jasmine, And Mocha? How Can We Use Them?

Answer»

Protractor, as described above, is the node.js IMPLEMENTATION of webdriver.io, which is in TURN the .js implementation of Selenium. So in short, it is in fact, the Selenium implementation in .js optimised for Angular or Angular JS applications. It is the OVERALL framework that provides with the baseline methods and functions to interact with the HTML/DOM ELEMENTS on a web page.

Jasmine – It is a test framework, like Junit (Java) and Unit Test (Python). It comes bundled with a lot of assertions and it is the default framework when working with Protractor. Jasmine supports BDD- styled tests using the describe- it syntax.

Mocha – Mocha is a test runner. Many people confuse it with Jasmine as a test framework. It is not a framework. Although it gives you a lot of features like a Test frameworks like hooks, the describe-it syntax, but it can not ADD assertions and other key unit testing components. You will always need it to pair with something like chai or chai-as-promised.

Protractor, as described above, is the node.js implementation of webdriver.io, which is in turn the .js implementation of Selenium. So in short, it is in fact, the Selenium implementation in .js optimised for Angular or Angular JS applications. It is the overall framework that provides with the baseline methods and functions to interact with the HTML/DOM elements on a web page.

Jasmine – It is a test framework, like Junit (Java) and Unit Test (Python). It comes bundled with a lot of assertions and it is the default framework when working with Protractor. Jasmine supports BDD- styled tests using the describe- it syntax.

Mocha – Mocha is a test runner. Many people confuse it with Jasmine as a test framework. It is not a framework. Although it gives you a lot of features like a Test frameworks like hooks, the describe-it syntax, but it can not add assertions and other key unit testing components. You will always need it to pair with something like chai or chai-as-promised.



Discussion

No Comment Found