Start Your First Project
This tutorial will guide you step-by-step on how to use CukeTest to create your first automation project. Even if you have never done automation testing before, you can easily get started.
In this tutorial, you will learn how to:
- Generate automation scripts by recording
- Write test scenarios using Gherkin syntax
- Create and manage model files
- Write test steps using JavaScript or Python
- Run your test project
- View test reports
- Master the basic process of Behavior Driven Development (BDD)
Prerequisites:
- Basic knowledge of JavaScript or Python programming (deep understanding is not required)
- Basic experience with editor operations
Before we start, let's conceive a simple test scenario:
We will use a simple Notepad application as the test object. This Notepad application is included in the CukeTest installation directory and can be found at bin/notepad.exe. The application allows you to enter text, adjust fonts, and save files. Although simple, it contains common elements of desktop applications, such as menu bars, toolbars, and text editing areas, making it an ideal object for learning. By testing this small application, you can learn how to implement automated testing, and later apply these skills to your own projects.
Test Scenario:
- Open the Notepad application.
- Enter "Hello CukeTest!" in the editing area.
- Verify that the entered text is correct.
- Change the font size to 36.
- Verify that the font size has been changed successfully.
- Close the Notepad application.
These operations involve basic software testing steps: clicking, inputting, and selecting, and include two checkpoints. Checkpoints are used to verify whether the operation results meet expectations and are an important part of automated testing.
For more automation examples in CukeTest or to view ready-made project codes directly, please refer to Run Built-in Samples.
Tutorial Structure
This tutorial is divided into 6 parts. The first 3 parts are applicable to users of all languages, and the last 3 parts can be selected for learning according to the programming language you are familiar with:
- Recording Your First Automation Script
- Understanding Model Files
- Writing Test Scenarios
- Developing BDD Projects with JavaScript
- Developing BDD Projects with Python
- Developing Pytest Projects
If you are already familiar with some steps, you can skip the relevant chapters directly.