Skip to main content

Creating Your First Automated Test

This guide walks you through creating a complete automated test from scratch.

Prerequisites​

Step 1: Create a New Project​

  1. Open the Test Automation view from the left navigation.
  2. Click add New in the toolbar.
  3. In the New Automation Project dialog, choose a Location (an empty directory) and a Project Name.
  4. Click Create. The project opens with an empty tree.
New Automation Project dialog
tip

If you already have the API collection, you can instead click Import Collection (Postman / Bruno / Insomnia) or Clone to start from a Git repository.

Step 2: Create a Test Suite​

  1. Right-click the project node in the tree.
  2. Select Append Test Suite.
  3. Give it a descriptive name (e.g., "User API Tests").

Use Append Parallel Test Suite if you want its test cases to run concurrently. To generate attack instances from a template request instead of writing steps by hand, use Add Security Test Case... (see Security Testing).

Step 3: Create a Test Case​

  1. Right-click the test suite.
  2. Select Add Test Case.
  3. The test case opens in the detail panel.

Step 4: Add a Send Request Step​

  1. Right-click the test case and select Add Test Step → Send Request.
  2. Choose the API operation from the request editor — this pre-fills the URL, method, and body schema.
  3. Configure the request body in the object editor.
  4. Configure headers and authentication in their respective tabs.
Send Request step editor

Step 5: Add an Assertion​

Send Request steps have built-in assertions, but you can also add explicit assertion steps:

  1. Right-click the test case and select Add Test Step → Assert.
  2. Choose the assertion type (e.g., HTTP Status Code).
  3. Configure the expected value (e.g., status code equals 200).
  4. Multiple assertions can be added to a single step.

Common Assertion Types​

AssertionUse Case
HTTP Status CodeVerify the response status (200, 201, 404, etc.)
JSON PathCheck a specific value in a JSON response body
XPathCheck a specific value in an XML/SOAP response body
HTTP HeaderVerify a response header value
ContainsCheck that the response body contains a string
VariableCompare a variable value against an expected value

Step 6: Run the Test​

  1. Select the test case, suite, or project in the tree.
  2. Click play_arrow Run in the toolbar. The button label reflects the selected item (Run Project, Run Test Suite, Run Test Case, or Run Test Step).
  3. Watch the progress in the diagnostics panel and the progress bar.
  4. Each step turns green (passed) or red (failed).

Step 7: View the Report​

  1. After execution, click description Show Report in the toolbar (or Show Report from the project's context menu).
  2. The report shows:
    • Pass/fail/skipped counts
    • Per-step timing and status
    • Request and response details for each Send Request step
    • Error messages for failed steps

Complete Example: Testing a REST API​

Here is a minimal test case that verifies a GET endpoint:

Test Suite: "Petstore API Tests"
└── Test Case: "Find pet by ID returns 200"
├── Step 1: Send Request
│ Operation: GET /pets/{id}
│ URL Params: id = 1
│
├── Step 2: Assert
│ Type: HTTP Status Code
│ Expected: 200
│
└── Step 3: Assert
Type: JSON Path
Path: $.name
Expected: "doggie"

Using Variables​

To make the test reusable across environments, use variables:

  1. Define a variable in the environment (e.g., petId = 1) via the Environment Management view.
  2. Reference it in the step using the ${petId} syntax in the URL parameter.
  3. Switch environments to test with different data.
note

Aethrix uses the ${VariableName} syntax for variable substitution (not {{...}}).

Next Steps​