
feature
(To post Employee data)
cucumber.runtime.CucumberException: java.lang.AssertionError: 1 expectation failed.
Response body doesn't match expectation.
Expected: a string containing "id"
Actual: {"error":{"text":SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'testfrtysio' for key 'employee_name_unique'}}
at cucumber.api.testng.TestNGCucumberRunner.runCucumber(TestNGCucumberRunner.java:69)
at cucumber.api.testng.AbstractTestNGCucumberTests.feature(AbstractTestNGCucumberTests.java:21)
Caused by: java.lang.AssertionError: 1 expectation failed.
Response body doesn't match expectation.
Expected: a string containing "id"
Actual: {"error":{"text":SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'testfrtysio' for key 'employee_name_unique'}}
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:471)
at io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call(Unknown Source)
at io.restassured.internal.ResponseSpecificationImpl.validateResponseIfRequired(ResponseSpecificationImpl.groovy:643)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at io.restassured.internal.ResponseSpecificationImpl.content(ResponseSpecificationImpl.groovy:94)
at io.restassured.specification.ResponseSpecification$content$2.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
at io.restassured.internal.ResponseSpecificationImpl.body(ResponseSpecificationImpl.groovy:244)
at io.restassured.internal.ValidatableResponseOptionsImpl.body(ValidatableResponseOptionsImpl.java:262)
at com.qa.stepdefinition.Employee_post_steps.verify_employee_id_is_generated(Employee_post_steps.java:36)
at ✽.And verify employee_id is generated(features/Sample.feature:8)
... Removed 44 stack frames
(Runs Cucumber Feature)
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite verbose="0" name="Command line suite"> <test name="Command line test" preserve-order="false"> <classes> <class name="com.qa.testrunner.TestRunner"/> <class name="com.qa.utilities.WireMockTest"/> </classes> </test> <!-- Command line test --> </suite> <!-- Command line suite -->
Tests for Command line suite
- Command line test (2 classes)
Groups for Command line suite
cucumber
feature
Times for Command line suite
Total running time: 2 seconds
Reporter output for Command line suite
0 ignored methods
Methods in chronological order
com.qa.testrunner.TestRunner
setUpClass
0 ms
feature(Get driver's details)
282 ms

tearDownClass
2772 ms