Test Runner
Running Security Tests with Levo.ai
Levo provides you with the ability to run security tests on your application endpoints. These tests can be executed in the following environments:
- On the Cloud
- On Premises
Requirements for Running Security Tests
To successfully run security tests, you need:
- A target service URL that is reachable.
- A valid configuration for authenticated endpoints.
- Valid API endpoint parameters.
Testing Publicly Reachable Services
If your target service is publicly accessible, you can directly run security tests from the Levo Cloud.
Testing Internal Services
For internal services that are not publicly reachable, you can use the Levo Testrunner. The testrunner is a service that can be installed on your premises.
Once you initiate security tests from the Levo UI, the testrunner will:
- Pull the tests to your premises.
- Execute them internally.
This approach ensures secure testing of internal APIs.
Installation
You can install the testrunner
Prerequisites
Before installation, ensure the following:
- Levo Authorization Token: Refer to Generating CLI Authorization Keys.
- Organization ID: Refer to Accessing Organization IDs.
- Helm or Docker: Install the appropriate tool based on your chosen installation method.
Install Testrunner via Helm on Kubernetes
Follow these steps to install the testrunner in a Kubernetes environment:
- Add Levo Helm Repository:
helm repo add levoai https://levoai.github.io/helm-charts/
- Install the Testrunner Helm Chart:
helm install \
--set key="auth-key" \
--set orgId="organization id" \
--set levoBaseUrl="https://api.levo.ai" \
testrunner levoai/testrunner
For apps hosted in different regions, update the levoBaseUrl
.
For example, if the testrunner is used with app.india-1.levo.ai
:
helm install \
--set key="auth-key" \
--set orgId="organization id" \
--set levoBaseUrl="https://api.india-1.levo.ai" \
testrunner levoai/testrunner
Install Testrunner via Docker
If Docker is installed on your machine, follow these steps to start the testrunner:
- Download the Loading...script.
- Make the script executable:
chmod +x levoai-testrunner.sh
- Set the required environment variables:
export LEVOAI_AUTH_KEY='<your-auth-key>'
export LEVOAI_ORG_ID='<your-organization-id>'
- Start the testrunner:
./levoai-testrunner.sh start
If you are running the script with sudo
, ensure that the environment variables are also set with sudo
. Otherwise, the script will not have access to these variables.
Alternatively, you can use the -E
flag with sudo
to preserve the user-defined environment variables, like this:
sudo -E ./levoai-testrunner.sh start
This ensures the script can access the required environment variables without explicitly redefining them under sudo.
- Stop the testrunner:
./levoai-testrunner.sh stop
For apps hosted in different regions, set the environment variable LEVOAI_BASE_URL
.
export LEVOAI_BASE_URL='https://api.india-1.levo.ai'
Need Help?
For further assistance, please reach out to Levo.ai Support.