Jira Ticket
Generating functional test scenarios using our AI based service Nova, through Jira details. Below you can see how to generate test cases from Jira details using both SDKs and APIs.
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 Jira details to generate test scenarios with SyncClient.
Java SyncClient Code
private static void createTestScenariosWithJira(){
SyncClient client = new SyncClient(<API_TOKEN>, null);
String jiraEndpoint = <JIRA_ENDPOINT>;
String jiraApiToken = <JIRA_API_TOKEN>;
String jiraUsername = <JIRA_USERNAME>;
String jiraId = <JIRA_ID>;
try {
NovaJira.CreateScenariosResponse response = client.nova.from_jira.create(jiraEndpoint, jiraApiToken, jiraUsername, jiraId);
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());
System.out.println("Creation Status: " + response.getJiraTitle());
System.out.println("Creation Status: " + response.getJiraDescription());
List<NovaJira.Scenario> scenarios = response.getScenarios();
// Loop over the list and print out scenarios
for (NovaJira.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();
}
}Using AsyncClient
Here's an example of utilizing Nova via the Jira 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 Jira details to generate test scenarios with SyncQyrusAI.
Using AsyncQyrusAI
Here's an example of utilizing Nova via the Jira details to generate test scenarios with AsyncQyrusAI.
Rest APIs
This API allows users to generate test scenarios based on provided Jira details.
Endpoint
URL : POST {{GATEWAY_URL}}/nova-sdk/v1/api/nova_jira
Headers
Authorization: [Your Authorization Token]
Custom: [Your Custom Header Value]
Request Body:
Response:
Last updated