Node.js Test Automation Samples

zyjing10 6714c214c5 update README.md 8 months ago
api-samples 870750e64e Add another 2 samples and update readme. 8 months ago
bdd-samples 9b3b9daaea add calc-zh sample 8 months ago
web-samples 870750e64e Add another 2 samples and update readme. 8 months ago
README.md 6714c214c5 update README.md 8 months ago

README.md

Node.js Test Automation Samples

This repo contains samples that demonstrate how to use do test automations using Node.js. The samples uses Cucumber.js to do various kinds of tests, including API test, Web UI test, mobile test etc.

These samples use Cucumber.js 3.x. While most of the sample works well with Cucumber.js only, it is recommended to open and run them with CukeTest application, which can boost the productivity of your work. It also has built-in Cucumber.js, which means you only need to install the packages that do the actual automation.

Using the samples

To get the sample code, clone the repo, or download it as a zip file and extract them locally.

To run any of the sample, for example "shopping":

  1. first install the npm packages, by going to the command prompt of the "shopping" folder and running the following from command line: npm install
  2. open "shopping" folder in CukeTest and click run.

Note: The folder end with "-zh" are samples with Chinese feature files.

Samples by category

The following categories are available:

  • api-samples: contains the API testing samples
  • web-samples: Web UI testing samples
  • bdd-samples: samples that demos the feature of Cucumber, which is a Behavior Driven Development (BDD) framework for test automation.

API Samples

Simple Service Github API(Chinese)

Web Samples

Web Calculator Shopping Shopping Cart
Baidu Search(Chinese)

BDD Samples

Math Calc (Chinese)

See also

  • To download CukeTest, go to cuketest.com, you can install either Windows Desktop version, or Windows Store version if you are using Windows 10.
  • You can read CukeTest documentation online without installing CukeTest. here is Chinese version.
  • Go to cucumber.js to get cucumber.js documentation.

Contributions

You are welcome to contribute more samples by sending them to us. Either with a pull request or opening an issue to describe your sample. We will add them to the repo once we confirm it works and serve the tutorial purpose.