HomeCodeceptJS

Introduction to CodeceptJS

Introduction to CodeceptJS

<<Complete WebDriverIO Tutorial>>                                         Next Post>>

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?

You should have a good understanding of Selenium (Not Compulsory) and JavaScript (will be explained in the upcoming sessions) and we’ll be doing a little bit of work on the command line. As a prerequisite for the codeceptjs test development, it’s necessary to have the following tools installed on your machine:

  1. Node.js
  2. npm
  3. 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:-

i) Edge

ii) Chrome

iii) Firefox

iv) Safari

v) PhantomJs

7) What are the different Programming languages that are supported by CodeceptJS ?

As its name contains JS. So, Javascript is the programming language that is supported by codeceptjs.

8) What are the different testing frameworks supported by CodeceptJS ?

Codeceptjs supports Mocha testing framework.

Next Steps:

> 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 ?

About Me > Ajay Lunia 

Connect to me on LinkedIn (Click here)

On a mission to help the Software Testing Community in all possible ways.

<<Complete WebDriverIO Tutorial>>                                        Next Post>>

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

For FREE Testing Tutorials & Videos

X
Open chat
Contact Us on Whatsapp