Skip to main content



Valido now has an SDK which we can integrate into the code of our projects to create visual validation tests and see the status and result in the app.


First, we need to have the two types of credentials necessary to work with the SDK so contact Valido to get them in case you don't have them.

AWS credentials

AWS credentials are required to write data to S3 and to access the S3 Maven repository. You have three ways to set up this credentials:

  • Add them to the ~/.aws/config file. In case you don't have it, you can create it:
    aws_access_key_id= value from AWS access portal
    aws_secret_access_key= value from AWS access portal
  • Setting environment variables: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
  • Using AWS CLI.

ℹ️ You can go to Provide temporary credentials to the AWS SDK for Java to get more details about AWS IAM credentials.

Valido crendentials

In order to access the Valido API and send execution results, you must create a Java properties file with the following structure:


On the other hand, you have also the option to add them by environment variables: VALIDO_USERNAME, VALIDO_PASSWORD and VALIDO_SECRETHASH.

Project setup

The SDK is stored in the private Maven repository in S3, that's why you need the following configuration in the POM file of your project. In this .pom file example, the only tags you should care about are: <repositories>, <distributionManagement>, extensions and the valido-framework dependency

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""


<name>Orienteed S3 Maven Release Repo</name>
<name>Orienteed S3 Maven Snapshot Repo</name>





Create SDK test

Set up flow properties

First, before to starting with the code, we need to create a Java .properties file for each flow. For Valido a flow is a test.


Definition of the properties keys:

  • env The Valido environment to be targeted.

  • secretsPath The location of your valido credentials file.

  • region Should be a two letter ISO country code.

  • resolution The resolution is determined by the device: DESKTOP, MOBILE, TABLET.

  • device You can specify a device ID or a resolution with the format width x height.

  • os Operating system for the execution test.

  • browser Specify the browser where the test will run. chrome, firefox,safari...

  • driverPath The location of the browser driver to be used to execute the test.

It is possible that for your projects this configuration can be generic, so to make it easier you should know that these properties can be set as environment variables. To set them as environment variables, they must follow the following format: VALIDO_PROPERTY_KEY, all capital letters.

Test implementation

Open the valido app and go to the Test tab in Testing section and make click on the green plus icon in order to add a new test, you will see displayed the SDK option. This option is only visible for Functional tests.

Valido lab section for SDK test creation

Once you select this option, Valido will give you the option to make some configurations for your test, like set a State. Once you select this option, Valido will give you the option to make some settings for your test, such as setting a state. When finished, an ID will be generated for your test. Be sure to save this ID for later when you make the code setup.

Valido lab section for SDK test creation

In your code, to implement the SDK in your project, you should:

  • Extend the ValidoCore class.
  • Pass the flow ID and the path of the properties files to the constructor.
package com.orienteed.valido.cores;

import static org.junit.jupiter.api.Assertions.assertTrue;


import org.junit.jupiter.api.Test;

import com.orienteed.valido.api.ValidoAPIException;

public class SdkExecutor {

String flowId = "00000xx0-x000-00xx-0000-0x0x0x0d0xx0";
String path = "src/test/resources/valido/";

public void test1() throws IOException, ValidoAPIException, URISyntaxException {
new SdkFlow(flowId, path).run();

To access the driver, use the getDriver() method. An example:

package com.orienteed.valido.cores;


import com.orienteed.valido.api.ValidoAPIException;

public class SdkFlow extends ValidoCore {

public SdkFlow(String flowId, String path) throws IOException, ValidoAPIException, URISyntaxException {
super(flowId, path);

public void flow() throws IOException, ValidoAPIException {
compare("Home page");