Skip to content

Latest commit

 

History

History
351 lines (252 loc) · 9.64 KB

manual.org

File metadata and controls

351 lines (252 loc) · 9.64 KB

DamageBDD User Manual: Get Started with Behavior Testing in Minutes!

Get Started with Behavior Testing in Minutes!

Welcome to DamageBDD, the powerful and user-friendly behavior testing platform designed to help you automate your application testing process.

In this quick start guide, we’ll walk you through setting up an account, writing a simple test and running it.

Let’s dive in! *

[*] please read usage terms & conditions here

Create an Account

To get started with DamageBDD, you need to create an account.

You can do this by signing up using the web ui at https://run.damagebdd.com or

using the `curl` command and sending a POST request to our account creation endpoin:

Check your email for a confirmation, then set up a password at the DamageBDD website.

Get a Bearer Token

Next, you need to get a bearer token by authenticating with DamageBDD:

Store the token securely. You will use it in your future requests to DamageBDD.

Heres is an example of fetching and storing an auth token using pass and jq:

Quick introduction to Gherkin

Before we move on to writing a running test, here is a quick introduction to the simple Gherkin syntax that DamageBDD uses.

Introduction to Gherkin

DamageBDD contains a suite of predefined steps that you can use to create rich test cases. Configurable step aliases are a planned feature that will enable users to configure the step definition to suite the organization’s vocabulary.

Available Steps

Running a Test

Now that you have an account and a bearer token, let’s write and run a simple test using Gherkin syntax:

Save this test in a file called echotest.feature, and then run it using `curl`:

where $AUTH_TOKEN is the bearer token can be retrieved in the previous step.

Authorized Domains

Domain authorization is implemented in the DamageBDD behavior testing and load testing platform to ensure that only authorized domains can run tests through the network. This helps maintain the security and integrity of the network by restricting access to trusted domains.

To interact with the domain authorization feature, users can use the following API endpoints:

List Domain Tokens

Generate Token for Domain

By utilizing these endpoints, users can manage and authorize domains for testing purposes effectively.

Available Steps

Step reference can be found here.

To get the most current list of step implementations:

Reporting

To fetch the report for previous runs find the report hash of the run.

For example to fetch all reports since the last one day:

Another example to query run records by result status of “success” or “failure”. This will return the run records for previous runs filtered by feature exit status.

To get the list of available reports for a specific run use the report hash

To get a specific report in a report hash, get <DAMAGE_PID> from the above list output

Scheduling

Create a repeating scheduled run

List schedules

To list all the scheduled jobs for a user.

Delete schedules

To delete a scheduled job, use the id from the listing in the following request

Localhost Testing Tunnel

To run tests on localhost using DamageBDD, you can utilize the ssh reverse tunneling feature. Please note that this feature is currently in the experimental phase.

To set up the tunnel, follow these steps:

  1. Make a POST request to https://run.damagebdd.com/tunnels/ with the following parameters:
  1. Once the request is successful, use the ssh client to establish the tunnel by running the following command:

You now have a tunnel set up from the damagebdd server to your server running on localhost. Any tests you submit that refer to localhost will be executed against the localhost server through this tunnel.

Please note that this feature is still being refined, and it may undergo changes and improvements. If you encounter any issues or have any feedback, please let us know.

Integrations

Webhooks

List Webhooks

Add Webhook

Remove Webhook

REST Api & Swagger UI

Swagger UI for the REST API can be found here.

WebInterface (experimental)

Here is the link to the experimental web interface, using curl is the current recommended method.