I am new to gradle, as i am facing an challenge to run RestAssured Api calls in parallel. Below is the sample code of HttpRequest and HttpResponse objects where i need to perform parallel execution on them .
import io.restassured.RestAssured;
import io.restassured.response.Response;
import io.restassured.specification.RequestSpecification;
import org.json.JSONArray;
import org.json.JSONObject;
public class BaseStepClass {
public static RequestSpecification httpRequest=null;
public static Response response=null;
public RequestSpecification get_httpRequest_Ref(String url)
{
System.out.println("1.Called the RequestSpecification method");
if(httpRequest==null)
{
System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");
RestAssured.baseURI = url;
httpRequest = RestAssured.given().log().all();
}
else
{
System.out.println(" HttpRequest is not null");
}
return httpRequest;
}
public static Response getHttpResponse(String endpoint_path)
{
response = httpRequest.get(endpoint_path);
return response;
}
}
Any advise or help on above issue will be greatly appreciated. Also let me know if you need more info.
question from:
https://stackoverflow.com/questions/65944678/how-could-i-perform-restassured-api-parallel-execution-using-cucumber-gradle 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…