Acceptance Testing with CodeceptJS

If you google the definition of Acceptance Testing, you will get different definitions. Without knowing what acceptance testing is, it is impossible for your team to conclude user stories development. acceptance testing
What is acceptance testing?
Acceptance tests validate that a story has been developed with the functionality the customer team had in mind when they wrote the story.-By Mike Cohn
Why developers can’t write acceptance tests?
Developers can think about acceptance tests for a user story but should not write since they are not part of Customer team (testers, product manager, real users and other stakeholders).
Write acceptance tests before starting a story development
Acceptance tests should be written before coding. It helps a developer to remain focused on a story during coding and concludes a user story development.
Why CodeceptJS?
Automating acceptance tests is good. However, the written automated acceptance tests should be understood by a business person. CodeceptJS helps you to write acceptance tests from user’s perspective, every command is described as an action of a user visiting a site, and supports WebDriverIO, Protractor, Selenium WebDriver JS, NightmareJS or others…
How to create a script
  • Install
  • After installing codeceptjs, run the below command. You will be asked for tests location and the helpers.
    Once the setup is done, you can see the below configurations in codecept.json
  • Depending on a helper you’ve chosen you will be asked to install corresponding package manually in the end of init.
  • Tests can be easily created by running
    The simplest test will look like this:
  • That’s it. The above-listed steps are just a reference. However, the following link CodeceptJS Quickstart provides all the details to configure CodeceptJS.

Leave a Reply

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