Create Tests

Manually Create/Edit Tests

Manually Creating and Editing Tests

While Vaktum's AI Test Generator provides an excellent starting point, you may want to create custom tests or modify existing ones to address specific scenarios.

Creating Tests Manually

Via Vaktum.com

  1. Navigate to the Tests section of Vaktum.com
  2. Click "Create Test"
  3. Select your API
  4. Configure your test:
    • Test Name: Provide a descriptive name
    • Description: Explain the purpose of the test
    • Endpoint: Select the API endpoint to test
    • HTTP Method: Choose the appropriate method (GET, POST, PUT, DELETE, etc.)
    • Request Headers: Add any required headers
    • Request Parameters: Configure query parameters, path parameters, or request body
    • Expected Response: Define the expected status code and response validation rules
  5. Click "Save" to create your test

Editing Existing Tests

Modifying Generated Tests

  1. Navigate to the Tests section of Vaktum.com
  2. Select the test suite containing the test you want to edit
  3. Click on the specific test
  4. Make your desired changes to:
    • Test metadata (name, description)
    • Request configuration
    • Response validation rules
    • Test dependencies
  5. Click "Save" to update the test

Advanced Test Configuration

Request Configuration

  • Headers: Add custom headers for authentication, content type, etc.
  • Query Parameters: Define URL parameters
  • Path Parameters: Configure dynamic segments in the URL path
  • Request Body: Specify the payload for POST, PUT, or PATCH requests

Response Validation

Vaktum supports various validation methods:

  • Status Code Validation: Verify the HTTP status code matches expectations
  • Header Validation: Check for specific response headers
  • JSON Schema Validation: Ensure the response body matches a defined schema
  • Content Validation: Verify specific values in the response
  • Variable Extraction: Extract values from responses for use in subsequent tests

Test Dependencies

You can create test sequences by defining dependencies:

  1. Create a test that extracts a value (like an ID) from the response
  2. Create a second test that uses this value in its request
  3. Define a dependency between the tests

This allows you to test complex workflows that span multiple API calls.

Test Organization

Organize your tests into logical groupings:

  • Test Suites: Group related tests together
  • Tags: Apply labels to tests for filtering and organization
  • Folders: Arrange tests into hierarchical structures

Exporting Tests

Vaktum allows you to Export Tests. Download test definitions as JSON for version control or sharing

🖥️ Shell
# Example: Running exported tests with Vaktum CLI
vaktum test --tests exported-tests.json --env environment.json

For more information on executing tests, see the Run Tests section.