Welcome to Daksha! This quick start guide will walk you through the process of running your first testcase using Daksha. Follow these three main steps to get started:
- Run the Daksha Server.
- Create a
test.yml
using the Daksha Recorder. - Send an API request to Daksha.
- Open your terminal or command prompt based on your operating system.
- Clone the Daksha Repository:
git clone https://github.com/mykaarma/daksha.git
- Navigate to the directory where you cloned Daksha and open a terminal here.
cd daksha
- Install Docker Desktop. Refer Docker Documentation
- Start the Docker engine.
- Create a test-data directory.
mkdir test-data
- Inside the test-data directory create a db-data directory. The database files will reside in this directory.
mkdir test-data/db-data
- Run the command
docker-compose up -d
to initiate the build and deploy the project. For macOS the command will bedocker compose up -d
. - You now have the daksha server running.
- Open chrome web store and add Daksha Recorder Extension to your chrome.
- Please refer to this video recording for creating a test.yml using Daksha Recorder.
- Download the test YAML (HelloWorld.yml) from Daksha Recorder.
- The following configs are user specific , so the recorder keeps them empty.You will need to edit the downloaded YAML file to add the following values.
config:
env: local
browser: chrome
driverAddress: http://selenium-hub:4444/wd/hub
name: HelloWorld
Here is an exapmle test YAML file- HelloWorld.yml
- Move this file to the
test-data
directory created in previous step.
- Copy the following curl request. Replace the email field and path field in the curl.
Path should be/test-data/{your file name}
. This is the path of the test.yml that you had copied in the test-data directory and mounted in docker.
curl --location --request POST 'http://127.0.0.1:8083/daksha/runner' \
--header 'Content-Type: text/plain' \
--data-raw '{
"email": "[email protected]",
"test": {
"source": "local",
"type": "file",
"path": "/daksha/test-data/HelloWorld.yml",
"variables": ""
}
}'
- Open this url http://localhost:4444/ui#/sessions
- In sessions you will see active session being generated on hitting the API request.
- Click on the video icon and enter password
secret
. You will be able to see what the steps being executed in chrome.