Best Citrus code snippet using com.consol.citrus.ws.actions.AssertSoapFault.getAction
Source:AssertSoapFaultTestRunnerTest.java
...76 });77 }78 };79 TestCase test = builder.getTestCase();80 Assert.assertEquals(test.getActionCount(), 1);81 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);82 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");83 84 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));85 86 Assert.assertEquals(container.getActionCount(), 1);87 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());88 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());89 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);90 }91 @Test92 public void testAssertSoapFaultDefaultValidatorBuilder() {93 reset(applicationContextMock, soapMessage, soapFaultValidator, soapBody, soapFault, soapFaultDetail, soapFaultDetailElement);94 when(soapMessage.getSoapBody()).thenReturn(soapBody);95 when(soapMessage.getFaultReason()).thenReturn(INTERNAL_SERVER_ERROR);96 when(soapBody.getFault()).thenReturn(soapFault);97 when(soapFault.getFaultActorOrRole()).thenReturn(SoapFaultDefinition.SERVER.getLocalPart());98 when(soapFault.getFaultCode()).thenReturn(SoapFaultDefinition.SERVER);99 when(soapFault.getFaultStringOrReason()).thenReturn(INTERNAL_SERVER_ERROR);100 when(soapFault.getFaultDetail()).thenReturn(null);101 when(applicationContextMock.getBean(TestContext.class)).thenReturn(applicationContext.getBean(TestContext.class));102 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);103 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);104 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());105 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());106 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());107 MockTestRunner builder = new MockTestRunner(getClass().getSimpleName(), applicationContextMock, context) {108 @Override109 public void execute() {110 assertSoapFault().faultCode(SoapFaultDefinition.SERVER.getLocalPart())111 .faultString(INTERNAL_SERVER_ERROR)112 .when(new AbstractTestAction() {113 @Override114 public void doExecute(TestContext context) {115 throw new SoapFaultClientException(soapMessage);116 }117 });118 }119 };120 TestCase test = builder.getTestCase();121 Assert.assertEquals(test.getActionCount(), 1);122 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);123 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");124 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));125 Assert.assertEquals(container.getActionCount(), 1);126 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());127 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());128 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);129 verify(soapFaultValidator).validateSoapFault(any(com.consol.citrus.ws.message.SoapFault.class), any(com.consol.citrus.ws.message.SoapFault.class),130 any(TestContext.class), any(ValidationContext.class));131 }132 @Test133 public void testFaultDetail() {134 reset(applicationContextMock, soapMessage, soapFaultValidator, soapBody, soapFault, soapFaultDetail, soapFaultDetailElement);135 when(soapMessage.getSoapBody()).thenReturn(soapBody);136 when(soapMessage.getFaultReason()).thenReturn(INTERNAL_SERVER_ERROR);137 when(soapBody.getFault()).thenReturn(soapFault);138 when(soapFault.getFaultActorOrRole()).thenReturn(SoapFaultDefinition.SERVER.getLocalPart());139 when(soapFault.getFaultCode()).thenReturn(SoapFaultDefinition.SERVER);140 when(soapFault.getFaultStringOrReason()).thenReturn(INTERNAL_SERVER_ERROR);141 when(soapFault.getFaultDetail()).thenReturn(soapFaultDetail);142 when(soapFaultDetail.getDetailEntries()).thenReturn(Collections.singleton(soapFaultDetailElement).iterator());143 when(soapFaultDetailElement.getSource()).thenReturn(new StringSource("<ErrorDetail><message>Something went wrong</message></ErrorDetail>"));144 when(applicationContextMock.getBean(TestContext.class)).thenReturn(applicationContext.getBean(TestContext.class));145 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(false);146 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());147 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());148 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());149 MockTestRunner builder = new MockTestRunner(getClass().getSimpleName(), applicationContextMock, context) {150 @Override151 public void execute() {152 assertSoapFault().faultCode(SoapFaultDefinition.SERVER.getLocalPart())153 .faultString(INTERNAL_SERVER_ERROR)154 .faultDetail("<ErrorDetail><message>Something went wrong</message></ErrorDetail>")155 .when(new AbstractTestAction() {156 @Override157 public void doExecute(TestContext context) {158 throw new SoapFaultClientException(soapMessage);159 }160 });161 }162 };163 TestCase test = builder.getTestCase();164 Assert.assertEquals(test.getActionCount(), 1);165 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);166 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");167 168 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));169 170 Assert.assertEquals(container.getActionCount(), 1);171 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());172 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());173 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);174 Assert.assertEquals(container.getFaultDetails().size(), 1L);175 Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><message>Something went wrong</message></ErrorDetail>");176 }177 178 @Test179 public void testMultipleFaultDetails() {180 reset(applicationContextMock, soapMessage, soapFaultValidator, soapBody, soapFault, soapFaultDetail, soapFaultDetailElement);181 when(soapMessage.getSoapBody()).thenReturn(soapBody);182 when(soapMessage.getFaultReason()).thenReturn(INTERNAL_SERVER_ERROR);183 when(soapBody.getFault()).thenReturn(soapFault);184 when(soapFault.getFaultActorOrRole()).thenReturn(SoapFaultDefinition.SERVER.getLocalPart());185 when(soapFault.getFaultCode()).thenReturn(SoapFaultDefinition.SERVER);186 when(soapFault.getFaultStringOrReason()).thenReturn(INTERNAL_SERVER_ERROR);187 when(soapFault.getFaultDetail()).thenReturn(soapFaultDetail);188 when(soapFaultDetail.getDetailEntries()).thenReturn(Arrays.asList(soapFaultDetailElement, soapFaultDetailElement).iterator());189 when(soapFaultDetailElement.getSource()).thenReturn(new StringSource("<ErrorDetail><code>1001</code></ErrorDetail>"))190 .thenReturn(new StringSource("<MessageDetail><message>Something went wrong</message></MessageDetail>"));191 when(applicationContextMock.getBean(TestContext.class)).thenReturn(applicationContext.getBean(TestContext.class));192 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(false);193 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());194 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());195 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());196 MockTestRunner builder = new MockTestRunner(getClass().getSimpleName(), applicationContextMock, context) {197 @Override198 public void execute() {199 assertSoapFault().faultCode(SoapFaultDefinition.SERVER.getLocalPart())200 .faultString(INTERNAL_SERVER_ERROR)201 .faultDetail("<ErrorDetail><code>1001</code></ErrorDetail>")202 .faultDetail("<MessageDetail><message>Something went wrong</message></MessageDetail>")203 .when(new AbstractTestAction() {204 @Override205 public void doExecute(TestContext context) {206 throw new SoapFaultClientException(soapMessage);207 }208 });209 }210 };211 TestCase test = builder.getTestCase();212 Assert.assertEquals(test.getActionCount(), 1);213 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);214 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");215 216 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));217 218 Assert.assertEquals(container.getActionCount(), 1);219 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());220 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());221 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);222 Assert.assertEquals(container.getFaultDetails().size(), 2L);223 Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><code>1001</code></ErrorDetail>");224 Assert.assertEquals(container.getFaultDetails().get(1), "<MessageDetail><message>Something went wrong</message></MessageDetail>");225 }226 227 @Test228 public void testFaultDetailResource() throws IOException {229 reset(resource, applicationContextMock, soapMessage, soapFaultValidator, soapBody, soapFault, soapFaultDetail, soapFaultDetailElement);230 when(resource.getInputStream()).thenReturn(new ByteArrayInputStream("<ErrorDetail><message>Something went wrong</message></ErrorDetail>".getBytes()));231 when(soapMessage.getSoapBody()).thenReturn(soapBody);232 when(soapMessage.getFaultReason()).thenReturn(INTERNAL_SERVER_ERROR);233 when(soapBody.getFault()).thenReturn(soapFault);234 when(soapFault.getFaultActorOrRole()).thenReturn(SoapFaultDefinition.SERVER.getLocalPart());235 when(soapFault.getFaultCode()).thenReturn(SoapFaultDefinition.SERVER);236 when(soapFault.getFaultStringOrReason()).thenReturn(INTERNAL_SERVER_ERROR);237 when(soapFault.getFaultDetail()).thenReturn(soapFaultDetail);238 when(soapFaultDetail.getDetailEntries()).thenReturn(Collections.singleton(soapFaultDetailElement).iterator());239 when(soapFaultDetailElement.getSource()).thenReturn(new StringSource("<ErrorDetail><message>Something went wrong</message></ErrorDetail>"));240 when(applicationContextMock.getBean(TestContext.class)).thenReturn(applicationContext.getBean(TestContext.class));241 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(false);242 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());243 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());244 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());245 MockTestRunner builder = new MockTestRunner(getClass().getSimpleName(), applicationContextMock, context) {246 @Override247 public void execute() {248 assertSoapFault().faultCode(SoapFaultDefinition.SERVER.getLocalPart())249 .faultString(INTERNAL_SERVER_ERROR)250 .faultDetailResource(resource)251 .when(new AbstractTestAction() {252 @Override253 public void doExecute(TestContext context) {254 throw new SoapFaultClientException(soapMessage);255 }256 });257 }258 };259 TestCase test = builder.getTestCase();260 Assert.assertEquals(test.getActionCount(), 1);261 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);262 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");263 264 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));265 266 Assert.assertEquals(container.getActionCount(), 1);267 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());268 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());269 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);270 Assert.assertEquals(container.getFaultDetails().size(), 1L);271 Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><message>Something went wrong</message></ErrorDetail>");272 }273 @Test274 public void testFaultDetailResourcePath() {275 reset(applicationContextMock, soapMessage, soapFaultValidator, soapBody, soapFault, soapFaultDetail, soapFaultDetailElement);276 when(soapMessage.getSoapBody()).thenReturn(soapBody);277 when(soapMessage.getFaultReason()).thenReturn(INTERNAL_SERVER_ERROR);278 when(soapBody.getFault()).thenReturn(soapFault);279 when(soapFault.getFaultActorOrRole()).thenReturn(SoapFaultDefinition.SERVER.getLocalPart());280 when(soapFault.getFaultCode()).thenReturn(SoapFaultDefinition.SERVER);281 when(soapFault.getFaultStringOrReason()).thenReturn(INTERNAL_SERVER_ERROR);282 when(soapFault.getFaultDetail()).thenReturn(soapFaultDetail);283 when(soapFaultDetail.getDetailEntries()).thenReturn(Collections.singleton(soapFaultDetailElement).iterator());284 when(soapFaultDetailElement.getSource()).thenReturn(new StringSource("<ErrorDetail><message>Something went wrong</message></ErrorDetail>"));285 when(applicationContextMock.getBean(TestContext.class)).thenReturn(applicationContext.getBean(TestContext.class));286 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(false);287 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());288 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());289 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());290 MockTestRunner builder = new MockTestRunner(getClass().getSimpleName(), applicationContextMock, context) {291 @Override292 public void execute() {293 assertSoapFault().faultCode(SoapFaultDefinition.SERVER.getLocalPart())294 .faultString(INTERNAL_SERVER_ERROR)295 .faultDetailResource("classpath:com/consol/citrus/dsl/runner/soap-fault-detail.xml")296 .when(new AbstractTestAction() {297 @Override298 public void doExecute(TestContext context) {299 throw new SoapFaultClientException(soapMessage);300 }301 });302 }303 };304 TestCase test = builder.getTestCase();305 Assert.assertEquals(test.getActionCount(), 1);306 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);307 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");308 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));309 Assert.assertEquals(container.getActionCount(), 1);310 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());311 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());312 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);313 Assert.assertEquals(container.getFaultDetails().size(), 0L);314 Assert.assertEquals(container.getFaultDetailResourcePaths().size(), 1L);315 Assert.assertEquals(container.getFaultDetailResourcePaths().get(0), "classpath:com/consol/citrus/dsl/runner/soap-fault-detail.xml");316 }317 318 @Test319 public void testMultipleFaultDetailsInlineAndResource() throws IOException {320 reset(resource, applicationContextMock, soapMessage, soapFaultValidator, soapBody, soapFault, soapFaultDetail, soapFaultDetailElement);321 when(resource.getInputStream()).thenReturn(new ByteArrayInputStream("<MessageDetail><message>Something went wrong</message></MessageDetail>".getBytes()));322 when(soapMessage.getSoapBody()).thenReturn(soapBody);323 when(soapMessage.getFaultReason()).thenReturn(INTERNAL_SERVER_ERROR);324 when(soapBody.getFault()).thenReturn(soapFault);325 when(soapFault.getFaultActorOrRole()).thenReturn(SoapFaultDefinition.SERVER.getLocalPart());326 when(soapFault.getFaultCode()).thenReturn(SoapFaultDefinition.SERVER);327 when(soapFault.getFaultStringOrReason()).thenReturn(INTERNAL_SERVER_ERROR);328 when(soapFault.getFaultDetail()).thenReturn(soapFaultDetail);329 when(soapFaultDetail.getDetailEntries()).thenReturn(Arrays.asList(soapFaultDetailElement, soapFaultDetailElement).iterator());330 when(soapFaultDetailElement.getSource()).thenReturn(new StringSource("<ErrorDetail><code>1001</code></ErrorDetail>"))331 .thenReturn(new StringSource("<MessageDetail><message>Something went wrong</message></MessageDetail>"));332 when(applicationContextMock.getBean(TestContext.class)).thenReturn(applicationContext.getBean(TestContext.class));333 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(false);334 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());335 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());336 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());337 MockTestRunner builder = new MockTestRunner(getClass().getSimpleName(), applicationContextMock, context) {338 @Override339 public void execute() {340 assertSoapFault().faultCode(SoapFaultDefinition.SERVER.getLocalPart())341 .faultString(INTERNAL_SERVER_ERROR)342 .faultDetail("<ErrorDetail><code>1001</code></ErrorDetail>")343 .faultDetailResource(resource)344 .when(new AbstractTestAction() {345 @Override346 public void doExecute(TestContext context) {347 throw new SoapFaultClientException(soapMessage);348 }349 });350 }351 };352 TestCase test = builder.getTestCase();353 Assert.assertEquals(test.getActionCount(), 1);354 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);355 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");356 357 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));358 359 Assert.assertEquals(container.getActionCount(), 1);360 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());361 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());362 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);363 Assert.assertEquals(container.getFaultDetails().size(), 2L);364 Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><code>1001</code></ErrorDetail>");365 Assert.assertEquals(container.getFaultDetails().get(1), "<MessageDetail><message>Something went wrong</message></MessageDetail>");366 }367 368 @Test369 public void testAssertSoapFaultBuilderWithValidator() {370 reset(applicationContextMock, soapMessage, soapFaultValidator, soapBody, soapFault, soapFaultDetail, soapFaultDetailElement);371 when(soapMessage.getSoapBody()).thenReturn(soapBody);372 when(soapMessage.getFaultReason()).thenReturn(INTERNAL_SERVER_ERROR);373 when(soapBody.getFault()).thenReturn(soapFault);374 when(soapFault.getFaultActorOrRole()).thenReturn(SoapFaultDefinition.SERVER.getLocalPart());375 when(soapFault.getFaultCode()).thenReturn(SoapFaultDefinition.SERVER);376 when(soapFault.getFaultStringOrReason()).thenReturn(INTERNAL_SERVER_ERROR);377 when(soapFault.getFaultDetail()).thenReturn(null);378 when(applicationContextMock.getBean(TestContext.class)).thenReturn(applicationContext.getBean(TestContext.class));379 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);380 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);381 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());382 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());383 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());384 MockTestRunner builder = new MockTestRunner(getClass().getSimpleName(), applicationContextMock, context) {385 @Override386 public void execute() {387 assertSoapFault().faultCode(SoapFaultDefinition.SERVER.getLocalPart())388 .faultString(INTERNAL_SERVER_ERROR)389 .validator(soapFaultValidator)390 .when(new AbstractTestAction() {391 @Override392 public void doExecute(TestContext context) {393 throw new SoapFaultClientException(soapMessage);394 }395 });396 }397 };398 TestCase test = builder.getTestCase();399 Assert.assertEquals(test.getActionCount(), 1);400 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);401 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");402 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));403 Assert.assertEquals(container.getActionCount(), 1);404 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());405 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());406 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);407 Assert.assertEquals(container.getValidator(), soapFaultValidator);408 verify(soapFaultValidator).validateSoapFault(any(com.consol.citrus.ws.message.SoapFault.class), any(com.consol.citrus.ws.message.SoapFault.class),409 any(TestContext.class), any(ValidationContext.class));410 }411 @Test412 public void testAssertSoapFaultBuilderWithActor() {413 reset(applicationContextMock, soapMessage, soapFaultValidator, soapBody, soapFault, soapFaultDetail, soapFaultDetailElement);414 when(soapMessage.getSoapBody()).thenReturn(soapBody);415 when(soapMessage.getFaultReason()).thenReturn(INTERNAL_SERVER_ERROR);416 when(soapBody.getFault()).thenReturn(soapFault);417 when(soapFault.getFaultActorOrRole()).thenReturn("MyActor");418 when(soapFault.getFaultCode()).thenReturn(SoapFaultDefinition.SERVER);419 when(soapFault.getFaultStringOrReason()).thenReturn(INTERNAL_SERVER_ERROR);420 when(soapFault.getFaultDetail()).thenReturn(null);421 when(applicationContextMock.getBean(TestContext.class)).thenReturn(applicationContext.getBean(TestContext.class));422 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(false);423 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());424 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());425 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());426 MockTestRunner builder = new MockTestRunner(getClass().getSimpleName(), applicationContextMock, context) {427 @Override428 public void execute() {429 assertSoapFault().faultCode(SoapFaultDefinition.SERVER.getLocalPart())430 .faultString(INTERNAL_SERVER_ERROR)431 .faultActor("MyActor")432 .when(new AbstractTestAction() {433 @Override434 public void doExecute(TestContext context) {435 throw new SoapFaultClientException(soapMessage);436 }437 });438 }439 };440 TestCase test = builder.getTestCase();441 Assert.assertEquals(test.getActionCount(), 1);442 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);443 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");444 445 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));446 447 Assert.assertEquals(container.getActionCount(), 1);448 Assert.assertTrue(container.getAction().getClass().isAnonymousClass());449 Assert.assertEquals(container.getFaultCode(), SoapFaultDefinition.SERVER.getLocalPart());450 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);451 Assert.assertEquals(container.getFaultActor(), "MyActor");452 }453}...
Source:AssertSoapFaultTestDesignerTest.java
...56 }57 };58 builder.configure();59 TestCase test = builder.getTestCase();60 Assert.assertEquals(test.getActionCount(), 1);61 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);62 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");63 64 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));65 66 Assert.assertEquals(container.getActionCount(), 1);67 Assert.assertEquals(container.getAction().getClass(), EchoAction.class);68 Assert.assertEquals(container.getFaultCode(), SOAP_ENV_SERVER_ERROR);69 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);70 Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");71 }72 73 @Test74 public void testFaultDetail() {75 reset(applicationContextMock);76 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);77 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);78 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());79 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());80 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());81 MockTestDesigner builder = new MockTestDesigner(applicationContextMock, context) {82 @Override83 public void configure() {84 assertSoapFault()85 .faultCode(SOAP_ENV_SERVER_ERROR)86 .faultString(INTERNAL_SERVER_ERROR)87 .faultDetail("<ErrorDetail><message>FooBar</message></ErrorDetail>")88 .when(echo("${foo}"));89 }90 };91 builder.configure();92 TestCase test = builder.getTestCase();93 Assert.assertEquals(test.getActionCount(), 1);94 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);95 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");96 97 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));98 99 Assert.assertEquals(container.getActionCount(), 1);100 Assert.assertEquals(container.getAction().getClass(), EchoAction.class);101 Assert.assertEquals(container.getFaultCode(), SOAP_ENV_SERVER_ERROR);102 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);103 Assert.assertEquals(container.getFaultDetails().size(), 1L);104 Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><message>FooBar</message></ErrorDetail>");105 Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");106 }107 108 @Test109 public void testMultipleFaultDetails() {110 reset(applicationContextMock);111 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);112 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);113 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());114 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());115 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());116 MockTestDesigner builder = new MockTestDesigner(applicationContextMock, context) {117 @Override118 public void configure() {119 assertSoapFault()120 .faultCode(SOAP_ENV_SERVER_ERROR)121 .faultString(INTERNAL_SERVER_ERROR)122 .faultDetail("<ErrorDetail><code>1001</code></ErrorDetail>")123 .faultDetail("<MessageDetail><message>FooBar</message></MessageDetail>")124 .when(echo("${foo}"));125 }126 };127 builder.configure();128 TestCase test = builder.getTestCase();129 Assert.assertEquals(test.getActionCount(), 1);130 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);131 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");132 133 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));134 135 Assert.assertEquals(container.getActionCount(), 1);136 Assert.assertEquals(container.getAction().getClass(), EchoAction.class);137 Assert.assertEquals(container.getFaultCode(), SOAP_ENV_SERVER_ERROR);138 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);139 Assert.assertEquals(container.getFaultDetails().size(), 2L);140 Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><code>1001</code></ErrorDetail>");141 Assert.assertEquals(container.getFaultDetails().get(1), "<MessageDetail><message>FooBar</message></MessageDetail>");142 Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");143 }144 145 @Test146 public void testFaultDetailResource() throws IOException {147 reset(resource, applicationContextMock);148 when(resource.getInputStream()).thenReturn(new ByteArrayInputStream("<ErrorDetail><message>FooBar</message></ErrorDetail>".getBytes()));149 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);150 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);151 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());152 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());153 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());154 MockTestDesigner builder = new MockTestDesigner(applicationContextMock, context) {155 @Override156 public void configure() {157 assertSoapFault()158 .faultCode(SOAP_ENV_SERVER_ERROR)159 .faultString(INTERNAL_SERVER_ERROR)160 .faultDetailResource(resource)161 .when(echo("${foo}"));162 }163 };164 builder.configure();165 TestCase test = builder.getTestCase();166 Assert.assertEquals(test.getActionCount(), 1);167 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);168 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");169 170 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));171 172 Assert.assertEquals(container.getActionCount(), 1);173 Assert.assertEquals(container.getAction().getClass(), EchoAction.class);174 Assert.assertEquals(container.getFaultCode(), SOAP_ENV_SERVER_ERROR);175 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);176 Assert.assertEquals(container.getFaultDetails().size(), 1L);177 Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><message>FooBar</message></ErrorDetail>");178 Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");179 }180 @Test181 public void testFaultDetailResourcePath() {182 reset(applicationContextMock);183 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);184 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);185 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());186 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());187 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());188 MockTestDesigner builder = new MockTestDesigner(applicationContextMock, context) {189 @Override190 public void configure() {191 assertSoapFault()192 .faultCode(SOAP_ENV_SERVER_ERROR)193 .faultString(INTERNAL_SERVER_ERROR)194 .faultDetailResource("com/consol/citrus/soap/fault.xml")195 .when(echo("${foo}"));196 }197 };198 builder.configure();199 TestCase test = builder.getTestCase();200 Assert.assertEquals(test.getActionCount(), 1);201 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);202 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");203 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));204 Assert.assertEquals(container.getActionCount(), 1);205 Assert.assertEquals(container.getAction().getClass(), EchoAction.class);206 Assert.assertEquals(container.getFaultCode(), SOAP_ENV_SERVER_ERROR);207 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);208 Assert.assertEquals(container.getFaultDetails().size(), 0L);209 Assert.assertEquals(container.getFaultDetailResourcePaths().size(), 1L);210 Assert.assertEquals(container.getFaultDetailResourcePaths().get(0), "com/consol/citrus/soap/fault.xml");211 Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");212 }213 214 @Test215 public void testMultipleFaultDetailsInlineAndResource() throws IOException {216 reset(resource, applicationContextMock);217 when(resource.getInputStream()).thenReturn(new ByteArrayInputStream("<MessageDetail><message>FooBar</message></MessageDetail>".getBytes()));218 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);219 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);220 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());221 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());222 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());223 MockTestDesigner builder = new MockTestDesigner(applicationContextMock, context) {224 @Override225 public void configure() {226 assertSoapFault()227 .faultCode(SOAP_ENV_SERVER_ERROR)228 .faultString(INTERNAL_SERVER_ERROR)229 .faultDetail("<ErrorDetail><code>1001</code></ErrorDetail>")230 .faultDetailResource(resource)231 .when(echo("${foo}"));232 }233 };234 builder.configure();235 TestCase test = builder.getTestCase();236 Assert.assertEquals(test.getActionCount(), 1);237 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);238 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");239 240 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));241 242 Assert.assertEquals(container.getActionCount(), 1);243 Assert.assertEquals(container.getAction().getClass(), EchoAction.class);244 Assert.assertEquals(container.getFaultCode(), SOAP_ENV_SERVER_ERROR);245 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);246 Assert.assertEquals(container.getFaultDetails().size(), 2L);247 Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><code>1001</code></ErrorDetail>");248 Assert.assertEquals(container.getFaultDetails().get(1), "<MessageDetail><message>FooBar</message></MessageDetail>");249 Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");250 }251 252 @Test253 public void testAssertSoapFaultBuilderWithValidator() {254 reset(applicationContextMock);255 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);256 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);257 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());258 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());259 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());260 MockTestDesigner builder = new MockTestDesigner(applicationContextMock, context) {261 @Override262 public void configure() {263 assertSoapFault()264 .faultCode(SOAP_ENV_SERVER_ERROR)265 .faultString(INTERNAL_SERVER_ERROR)266 .validator(soapFaultValidator)267 .when(echo("${foo}"));268 }269 };270 builder.configure();271 TestCase test = builder.getTestCase();272 Assert.assertEquals(test.getActionCount(), 1);273 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);274 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");275 276 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));277 278 Assert.assertEquals(container.getActionCount(), 1);279 Assert.assertEquals(container.getAction().getClass(), EchoAction.class);280 Assert.assertEquals(container.getFaultCode(), SOAP_ENV_SERVER_ERROR);281 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);282 Assert.assertEquals(container.getValidator(), soapFaultValidator);283 Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");284 }285 286 @Test287 public void testAssertSoapFaultBuilderWithActor() {288 reset(applicationContextMock);289 when(applicationContextMock.containsBean(SOAP_FAULT_VALIDATOR)).thenReturn(true);290 when(applicationContextMock.getBean(SOAP_FAULT_VALIDATOR, SoapFaultValidator.class)).thenReturn(soapFaultValidator);291 when(applicationContextMock.getBean(TestActionListeners.class)).thenReturn(new TestActionListeners());292 when(applicationContextMock.getBeansOfType(SequenceBeforeTest.class)).thenReturn(new HashMap<String, SequenceBeforeTest>());293 when(applicationContextMock.getBeansOfType(SequenceAfterTest.class)).thenReturn(new HashMap<String, SequenceAfterTest>());294 MockTestDesigner builder = new MockTestDesigner(applicationContextMock, context) {295 @Override296 public void configure() {297 assertSoapFault()298 .faultCode(SOAP_ENV_SERVER_ERROR)299 .faultString(INTERNAL_SERVER_ERROR)300 .faultActor("MyActor")301 .when(echo("${foo}"));302 }303 };304 builder.configure();305 TestCase test = builder.getTestCase();306 Assert.assertEquals(test.getActionCount(), 1);307 Assert.assertEquals(test.getActions().get(0).getClass(), AssertSoapFault.class);308 Assert.assertEquals(test.getActions().get(0).getName(), "soap-fault");309 310 AssertSoapFault container = (AssertSoapFault)(test.getTestAction(0));311 312 Assert.assertEquals(container.getActionCount(), 1);313 Assert.assertEquals(container.getAction().getClass(), EchoAction.class);314 Assert.assertEquals(container.getFaultCode(), SOAP_ENV_SERVER_ERROR);315 Assert.assertEquals(container.getFaultString(), INTERNAL_SERVER_ERROR);316 Assert.assertEquals(container.getFaultActor(), "MyActor");317 Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");318 }319}...
Source:AssertSoapFault.java
...180 /**181 * Gets the action.182 * @return the action183 */184 public TestAction getAction() {185 return action;186 }187 /**188 * Gets the faultString.189 * @return the faultString190 */191 public String getFaultString() {192 return faultString;193 }194 /**195 * Gets the faultCode.196 * @return the faultCode197 */198 public String getFaultCode() {...
getAction
Using AI Code Generation
1package com.consol.citrus.samples;2import com.consol.citrus.dsl.runner.TestRunner;3import com.consol.citrus.dsl.testng.TestNGCitrusTestDesigner;4import org.springframework.http.HttpStatus;5import org.testng.annotations.Test;6public class 3 extends TestNGCitrusTestDesigner {7 public void test() {8 TestRunner runner = createTestRunner();9 runner.run(getAction());10 }11}12package com.consol.citrus.samples;13import com.consol.citrus.dsl.runner.TestRunner;14import com.consol.citrus.dsl.testng.TestNGCitrusTestDesigner;15import org.springframework.http.HttpStatus;16import org.testng.annotations.Test;17public class 4 extends TestNGCitrusTestDesigner {18 public void test() {19 TestRunner runner = createTestRunner();20 runner.run(getAction());21 }22}23package com.consol.citrus.samples;24import com.consol.citrus.dsl.runner.TestRunner;25import com.consol.citrus.dsl.testng.TestNGCitrusTestDesigner;26import org.springframework.http.HttpStatus;27import org.testng.annotations.Test;28public class 5 extends TestNGCitrusTestDesigner {29 public void test() {30 TestRunner runner = createTestRunner();31 runner.run(getAction());32 }33}34package com.consol.citrus.samples;35import com.consol.citrus.dsl.runner.TestRunner;36import com.consol.citrus.dsl.testng.TestNGCitrusTestDesigner;37import org.springframework.http.HttpStatus;38import org.testng.annotations.Test;39public class 6 extends TestNGCitrusTestDesigner {40 public void test() {41 TestRunner runner = createTestRunner();42 runner.run(getAction());43 }44}45package com.consol.citrus.samples;46import com.consol.citrus.dsl.runner.TestRunner;47import com.consol.citrus.dsl.testng
getAction
Using AI Code Generation
1package com.consol.citrus.samples;2import com.consol.citrus.annotations.CitrusTest;3import com.consol.citrus.dsl.junit.JUnit4CitrusTestDesigner;4import com.consol.citrus.dsl.testng.TestNGCitrusTestDesigner;5import com.consol.citrus.ws.actions.AssertSoapFault;6import org.springframework.http.HttpStatus;7import org.springframework.http.MediaType;8import org.springframework.web.bind.annotation.GetMapping;9import org.springframework.web.bind.annotation.RequestMapping;10import org.springframework.web.bind.annotation.RestController;11import org.testng.annotations.Test;12import static com.consol.citrus.dsl.endpoint.CitrusEndpoints.soap;13import static com.consol.citrus.http.actions.HttpActionBuilder.http;14public class AssertSoapFaultTest extends TestNGCitrusTestDesigner {15 public void assertSoapFaultTest() {16 variable("soapFault", "soapFault");17 variable("faultString", "faultString");18 http(httpActionBuilder -> httpActionBuilder.client("httpClient")19 .send()20 .get("/citrus-ws-standalone/soapfault")21 .accept(MediaType.APPLICATION_JSON_VALUE));22 soap(soapActionBuilder -> soapActionBuilder.client("soapClient")23 .receive()24 soap(soapActionBuilder -> soapActionBuilder.client("soapClient")25 .send()26 getAction(AssertSoapFault.class).setFaultString("${faultString}");27 getAction(AssertSoapFault.class).setFaultCode("${soapFault}");28 getAction(AssertSoapFault.class).setFaultDetail("citrus:concat('Hello ', 'World!')");29 soap(soapActionBuilder -> soapActionBuilder.client("soapClient")30 .send()
getAction
Using AI Code Generation
1public class 3 extends AbstractTestNGCitrusTest {2 public void 3() {3 variable("messageId", "citrus:randomNumber(10)");4 variable("correlationId", "citrus:randomNumber(10)");5 echo("Sending message with SOAP fault");6 send("soapMessageSender")7 "${messageId}</MessageId>" +8 "${correlationId}</CorrelationId>" +9 .header("operation", "echoMessage")10 .header("Content-Type", "text/xml");11 echo("Receive SOAP fault");12 receive("soapMessageReceiver")13 "${messageId}</MessageId>" +14 "${correlationId}</CorrelationId>" +15 .header("operation", "echoMessage")16 .header("Content-Type", "text/xml");17 echo("Validate SOAP fault");18 assertSoapFault("soapFaultValidator")19 .faultCode("soap:Server")20 .faultString("Request message is missing required information");21 }22}
getAction
Using AI Code Generation
1package com.consol.citrus.samples;2import com.consol.citrus.dsl.builder.BuilderSupport;3import com.consol.citrus.dsl.builder.HttpClientActionBuilder;4import com.consol.citrus.dsl.builder.HttpServerActionBuilder;5import com.consol.citrus.dsl.builder.SendActionBuilder;6import com.consol.citrus.dsl.runner.TestRunner;7import com.consol.citrus.dsl.testng.TestNGCitrusTest;8import com.consol.citrus.message.MessageType;9import org.testng.annotations.Test;10public class 3 extends TestNGCitrusTest {11 public void 3() {12 description("asserting the fault code of a SOAP Fault using AssertSoapFault class");13 variable("faultCode", "soap:Client");14 http(httpServer -> httpServer15 .server("soapFaultServer")16 .autoStart(true)17 .port(8081)18 .timeout(10000)19 " <faultcode>${faultCode}</faultcode>\n" +20 "</soap:Envelope>"));21 http(httpClient -> httpClient22 .client("soapFaultClient")23 .send()24 .post()25 .fork(true)26 .contentType("text/xml")27 .header("SOAPAction", "echo")28 .header("Content-Type", "text/xml")29 .accept("text/xml")30 .accept("application/soap+xml")31 .acceptCharset("UTF
getAction
Using AI Code Generation
1public void test() {2 send("sendRequest")3 .header("operation", "sayHello");4 assertSoapFault("assertSoapFault")5 .faultString("Sender Fault")6 .detail()7 .entry("faultCode", "CITRUS-1001")8 .entry("faultString", "Citrus test failed")9 .entry("faultDetail", "Test error message")10 .endDetail();11 receive("receiveResponse")12 .header("operation", "sayHello");13}14public void test() {15 send("sendRequest")16 .header("operation", "sayHello");17 receiveSoapFault("receiveSoapFault")18 .faultString("Sender Fault")19 .detail()20 .entry("faultCode", "CITRUS-1001")21 .entry("faultString", "Citrus test failed")22 .entry("faultDetail", "Test error message")23 .endDetail();24 receive("receiveResponse")25 .header("operation", "
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!