Introduction to CodeceptJS
Following are the content by which you can be familiar with Codeceptjs:-
Note: All the terms and tools mentioned in this article will be explained in detail in the upcoming sessions. Keep reading even though you don’t understand any terms and only understand this topic at a high level.
1) What is CodeceptJS?
CodeceptJS is a modern end to end testing framework with a special BDD-style syntax.
It’s not so new in the market. It uses existing tooling infrastructure for example if you use puppeteer, WebDriver (uses WebdriverIO), Protractor, TestCafe, Nightmare, Appium or Detox. You can use your codecepts on top of it to execute your code from there.
In short codeceptjs can be called as a framework of frameworks that provides syntax utilizing one of the well-known libraries such as WebDriverIO, Protractor, NightmareJS, Appium, or others.
CodeceptJS uses Helper modules to provide actions to the “I” object.
2) Why should you consider using CodeceptJS?
Following are the reasons why you should consider using codeceptjs :-
i) It is based on the Mocha testing framework.
ii) it has been designed for scenario driven acceptance testing in BDD-style.
iii) It plays nice with TypeScript as well.
iv) Smart locators: use names, labels, matching text, CSS or XPath to locate elements.
v) Interactive debugging shell: pause test at any point and try different commands in a browser.
vi) Easily create tests, pageobjects, step objects with CLI generators.
In short with CodeceptJS your scenario-driven functional and acceptance tests will be as simple and clean as they can be. You don’t need to worry about the asynchronous nature of NodeJS or about various APIs of Selenium, Puppeteer, Protractor, TestCafe, etc. as CodeceptJS unifies them and makes them work as they are synchronous.
3) What are the prerequisites required for learning codeceptJS?
- Web-browser (In our case, chrome)
Installations for all the mentioned prerequisites will be explained in the upcoming sessions
4) What types of applications codeceptJS can and cannot Automate ?
Codeceptjs can automate both web applications and native mobile applications with help of its helpers.
5) What So Special About codeceptJS ?
CodeceptJS tests are:
- Synchronous. You don’t need to care about callbacks, or promises, test scenarios are linear, your test should be too.
- Written from the user’s perspective. Every action is a method of I. That makes tests easy to read, write and maintain even for non-tech persons.
Backend API agnostic. We don’t know which WebDriver implementation is running this test. We can easily switch from WebDriverIO to Protractor or PhantomJS
6) What all different browsers are supported by codeceptJS ?
Codeceptjs supports all the below mentioned famous browsers in the market:-
7) What are the different Programming languages that are supported by CodeceptJS ?
8) What are the different testing frameworks supported by CodeceptJS ?
Codeceptjs supports Mocha testing framework.
> To learn more about CodeceptJS, continue to the next post (Click on Next Post link below)
> Check complete CodeceptJS Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
On a mission to help the Software Testing Community in all possible ways.