How to upload Cucumber execution results to Zephyr Scale [JAVA]

Yosuva ArulanthuJava, Selenium, Test Automation, TestingLeave a Comment

It Creates a new Test Cycle based on provided automated test results.
This endpoint receives a zip file containing one or more Cucumber Json Output file.
Below is the java example to upload Cucumber execution results to Zephyr Scale

package com.yosuva.tests;
import org.testng.Assert;
import static io.restassured.RestAssured.*;
import io.restassured.RestAssured;
import io.restassured.response.Response;
public class ZephyrScaleUploadTestExecutionResult {
  public void updateZephyrTestCase() {
  File file=new File(System.getProperty("user.dir")+ \\target\\cucumber\\;
  Response response = given().queryParam("projectKey", "ABC")
  .headers("Authorization", "Bearer Auth_token")
  System.out.println("Status Code : "+response.statusCode());
  System.out.println("Response Body : "+response.getBody().asString());

Leave a Reply

Your email address will not be published.