-
Notifications
You must be signed in to change notification settings - Fork 5
Create, Update and Deploy Virtual Service before a test
sachinmaske edited this page Oct 17, 2022
·
1 revision
This example explains how to Create, Update and Deploy Virtual service for a single test case.
@DevTestVirtualServer(deployServiceToVse = "VSE",groupName="V3UpdateTest")
public class VirtualServiceV3UpdateTest {
@Rule
public VirtualServicesRule rules = new VirtualServicesRule();
/**
* Create, Update and Deploy VS with new RRPair
*/
@DevTestVirtualServicesV3 (
value = {@DevTestVirtualServiceV3(
serviceName = "vsV3_Deploy",
port = "24778",
workingFolder = "v3/rrpair",
inputFile2 = "operation-8-req.txt",
inputFile1 = "operation-8-rsp.txt"
),
@DevTestVirtualServiceV3(
serviceName = "vsV3_Deploy",
workingFolder = "v3/rrpair",
inputFile2 = "operation-9-req.txt",
inputFile1 = "operation-9-rsp.txt",
type = VirtualServiceV3Type.UPDATE
)}
)
@Test
public void vsV3_Deploy(){
ResponseParser op8Response = HttpUtils.GET(HttpUtils.URL_FORMAT, "http", "localhost",
"24778","import/test/operation-8");
ResponseParser op9Response = HttpUtils.GET(HttpUtils.URL_FORMAT, "http", "localhost",
"24778", "import/test/operation-9");
assert (op8Response!=null);
assert (op8Response.getValue("$.TCEntry[0].termsType").equals("Operation 8 terms"));
assert (op9Response != null);
assert (op9Response.getValue("$.TCEntry[0].termsType").equals("Operation 9 terms"));
}
}
Annotation DevTestVirtualServiceV3
- Create and Deploy a Virtual Service Before a Test
- Create and Deploy a Virtual Service Before Any Test from the Class
- Create and Deploy Multiple Virtual Services Before a Test
- Create Update and Deploy Virtual Service Before a Test
- Create, Update and Deploy Virtual Service Before any Test from the Class
- Create and Deploy Virtual Service with RR Pair
- Create and Deploy Virtual Service with RR Pair Zip File
- Create and Deploy Virtual Service with Swagger File
- Create and Deploy Virtual Service with Swagger Url
- Create and Deploy Virtual Service with RAML File
- Create and Deploy Virtual Service with RAML Url
- Create and Deploy Virtual Service with WADL File
- Create and Deploy Virtual Service with WADL Url
- Create and Deploy Virtual Service with VSM/VSI File
- Create and Deploy Virtual Service and Update Data and Config File
- Create and Deploy Virtual Service with Parameterized VSM File
- Create and Deploy Virtual Service with Parameterized Input File
- Create and Deploy Virtual Service with SSL End-Point
- Create and Deploy a Virtual Service before a Test
- Create and Deploy a Virtual Service before Any Test from the Class
- Create and Deploy Multiple Virtual Services before a Test
- Create and Deploy with VRS
- Create and Deploy with RR Pair
- Create and Deploy with VSM
- Parameterized DevTest Virtual Service Annotation
- Generate RR Pairs Utility