Rally Work Items
Generating functional test scenarios using our AI based service Nova, through Rally details. Below you can see how to generate test cases from Rally details using SDKs.
Usage 🚀
Refer to Setup Guide for installing dependecies for both Java and Python.
JAVA
There are 2 clients available with the Java SDK: SyncClient and AsyncClient
Java Client Code
# for async client
import org.qyrus.ai_sdk.Clients.AsyncClient;
AsyncClient client = new AsyncClient(<API_TOKEN>, null);
# for sync client
import org.qyrus.ai_sdk.Clients.SyncClient;
SyncClient client = new SyncClient(<API_TOKEN>, null);Using SyncClient
Here's an example of utilizing Nova via the Rally details to generate test scenarios with SyncClient.
Java SyncClient Code
private static void createTestScenariosWithRally(){
Dotenv dotenv = Dotenv.load();
String QYRUS_AI_SDK_API_TOKEN = dotenv.get("QYRUS_AI_SDK_API_TOKEN");
SyncClient client = new SyncClient(QYRUS_AI_SDK_API_TOKEN, null);
String rally_url = "https://rally1.rallydev.com";
String ticket_id = "US1";
String rally_api_key = <RALLY-API-KEY>;
String workspace_name = "RALLY DEMO DATA";
long startTime = System.currentTimeMillis();
int numberOfRequests = 1;
for (int i = 0; i < numberOfRequests; i++) {
try {
NovaDescription.CreateScenariosResponse response = client.nova.from_rally.create(rally_url, rally_api_key, workspace_name, ticket_id);
System.out.println("Creation Status: " + response.isOk());
System.out.println("Creation Status: " + response.getMessage());
//Show all the scenarios generated
if (response != null && response.isOk() == true && response.getScenarios() != null) {
System.out.println("Creation Status: " + response.getNovaRequestId());
List<NovaDescription.Scenario> scenarios = response.getScenarios();
// Loop over the list and print out scenarios
for (NovaDescription.Scenario scenario : scenarios) {
System.out.println("Test Script Name: " + scenario.getTestScriptName());
System.out.println("Test Script Objective: " + scenario.getTestScriptObjective());
System.out.println("Reason to Test: " + scenario.getReasonToTest());
System.out.println("Criticality Description: " + scenario.getCriticalityDescription());
System.out.println("Criticality Score: " + scenario.getCriticalityScore());
System.out.println("--------------------------------------");
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
long endTime = System.currentTimeMillis();
System.out.println("Synchronous total time for Nova with Rally" + numberOfRequests + " requests: " + (endTime - startTime) + " ms");
}Using AsyncClient
Here's an example of utilizing Nova via the Rally details to generate test scenarios with AsyncClient.
PYTHON
There are two clients available with the Python SDK: SyncQyrusAI and AsyncQyrusAI.
Using SyncQyrusAI
Here's an example of utilizing Nova via the Rally details to generate test scenarios with SyncQyrusAI.
Using AsyncQyrusAI
Here's an example of utilizing Nova via the Rally details to generate test scenarios with AsyncQyrusAI.
Note: Currently, Nova does not support the use of Rally work items to generate test scenarios through its Rest APIs.
Last updated