Commit 703bcfe4 authored by Arpita Shrivastava's avatar Arpita Shrivastava

update with util files

parent 4f610df9
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>
2019-06-18 00:07:08 INFO DriversSteps:44 - 200
2019-06-18 00:10:12 INFO DriversSteps:44 - 200
2019-06-18 00:12:04 INFO DriversSteps:46 - 200
2019-06-18 00:28:02 INFO DriversSteps:46 - 200
2019-06-18 00:31:16 INFO DriversSteps:46 - 200
2019-06-18 00:36:03 INFO DriversSteps:47 - 200
2019-06-18 00:36:38 INFO DriversSteps:47 - 200
2019-06-18 00:47:40 INFO DriversSteps:47 - 200
2019-06-18 00:50:41 INFO DriversSteps:47 - 200
2019-06-18 00:51:45 INFO DriversSteps:47 - 200
2019-06-18 01:27:39 INFO DriversSteps:48 - 200
2019-06-18 01:30:45 INFO DriversSteps:48 - 200
2019-06-18 01:40:36 INFO DriversSteps:48 - 200
2019-06-18 10:52:31 INFO DriversSteps:48 - 200
2019-06-18 11:42:13 INFO DriversSteps:48 - 200
2019-06-18 11:55:03 INFO DriversSteps:48 - 200
2019-06-18 12:29:46 INFO DriversSteps:49 - 200
2019-06-18 12:41:24 INFO DriversSteps:49 - 200
2019-06-18 12:43:07 INFO DriversSteps:49 - 200
2019-06-18 12:55:35 INFO DriversSteps:50 - 200
2019-06-18 12:57:39 INFO DriversSteps:50 - 200
2019-06-18 13:04:19 INFO DriversSteps:50 - 200
2019-06-18 14:05:10 INFO DriversSteps:50 - 200
2019-06-18 14:11:48 INFO DriversSteps:50 - 200
2019-06-18 14:12:52 INFO DriversSteps:50 - 200
2019-06-18 14:46:57 INFO DriversSteps:50 - 200
2019-06-18 15:07:04 INFO DriversSteps:52 - 200
2019-06-18 15:47:12 INFO Drivers_get_steps:52 - 200
2019-06-19 12:12:18 INFO Drivers_get_steps:52 - 200
2019-06-19 12:13:48 INFO Drivers_get_steps:52 - 200
2019-06-19 12:17:20 INFO Drivers_get_steps:52 - 200
2019-06-19 12:36:47 INFO Drivers_get_steps:52 - 200
2019-06-19 12:37:47 INFO Drivers_get_steps:52 - 200
2019-06-19 12:38:21 INFO Drivers_get_steps:52 - 200
...@@ -4,38 +4,116 @@ ...@@ -4,38 +4,116 @@
"elements": [ "elements": [
{ {
"line": 4, "line": 4,
"name": "call api and get the location data of country US and zip code 90210", "name": "Get details of drivers by driver id",
"description": "", "description": "",
"id": "get-the-location-data-by-country-and-zip-code;call-api-and-get-the-location-data-of-country-us-and-zip-code-90210", "id": "get-driver\u0027s-details;get-details-of-drivers-by-driver-id",
"type": "scenario", "type": "scenario",
"keyword": "Scenario", "keyword": "Scenario",
"steps": [ "steps": [
{ {
"result": { "result": {
"status": "undefined" "duration": 734026982,
"status": "passed"
}, },
"line": 5, "line": 5,
"name": "The country and zip code is valid", "name": "a driver exists with driver id \"abecassis.json\"",
"match": {}, "match": {
"arguments": [
{
"val": "abecassis.json",
"offset": 32
}
],
"location": "DriversSteps.a_driver_exists_with_driver_id(String)"
},
"keyword": "Given " "keyword": "Given "
}, },
{ {
"result": { "result": {
"status": "undefined" "duration": 1617381869,
"status": "passed"
}, },
"line": 6, "line": 6,
"name": "location data is retrieved by country code and zipcode.", "name": "a driver details is retrieved by driver id",
"match": {}, "match": {
"location": "DriversSteps.a_driver_details_is_retrieved_by_driver_id()"
},
"keyword": "When " "keyword": "When "
}, },
{ {
"result": { "result": {
"status": "undefined" "duration": 29931788,
"status": "passed"
}, },
"line": 7, "line": 7,
"name": "verify the status is successful", "name": "the status code is 200",
"match": {}, "match": {
"arguments": [
{
"val": "200",
"offset": 19
}
],
"location": "DriversSteps.the_status_code_is(int)"
},
"keyword": "Then " "keyword": "Then "
},
{
"result": {
"duration": 9620846,
"error_message": "cucumber.runtime.CucumberException: No such field com.qa.stepdefinition.Drivers.mRData.DriverTable.Drivers.driverId\n\tat cucumber.runtime.table.TableConverter.toListOfComplexType(TableConverter.java:106)\n\tat cucumber.runtime.table.TableConverter.toList(TableConverter.java:126)\n\tat cucumber.api.DataTable.asList(DataTable.java:125)\n\tat com.qa.stepdefinition.DriversSteps.response_includes_the_following(DriversSteps.java:70)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat cucumber.runtime.Utils$1.call(Utils.java:40)\n\tat cucumber.runtime.Timeout.timeout(Timeout.java:16)\n\tat cucumber.runtime.Utils.invoke(Utils.java:34)\n\tat cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38)\n\tat cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)\n\tat cucumber.runtime.Runtime.runStep(Runtime.java:300)\n\tat cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)\n\tat cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)\n\tat cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)\n\tat cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:165)\n\tat cucumber.api.testng.TestNGCucumberRunner.runCucumber(TestNGCucumberRunner.java:63)\n\tat cucumber.api.testng.AbstractTestNGCucumberTests.feature(AbstractTestNGCucumberTests.java:21)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)\n\tat org.testng.internal.Invoker.invokeMethod(Invoker.java:639)\n\tat org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)\n\tat org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)\n\tat org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)\n\tat org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)\n\tat org.testng.TestRunner.privateRun(TestRunner.java:774)\n\tat org.testng.TestRunner.run(TestRunner.java:624)\n\tat org.testng.SuiteRunner.runTest(SuiteRunner.java:359)\n\tat org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)\n\tat org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)\n\tat org.testng.SuiteRunner.run(SuiteRunner.java:261)\n\tat org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)\n\tat org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)\n\tat org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)\n\tat org.testng.TestNG.runSuitesLocally(TestNG.java:1140)\n\tat org.testng.TestNG.run(TestNG.java:1048)\n\tat org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)\n\tat org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)\n\tat org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)\n",
"status": "failed"
},
"line": 8,
"name": "response includes the following",
"match": {
"location": "DriversSteps.response_includes_the_following(DataTable)"
},
"rows": [
{
"cells": [
"MRData.DriverTable.Drivers.driverId",
"abecassis"
],
"line": 9
},
{
"cells": [
"MRData.DriverTable.Drivers.url",
"http://en.wikipedia.org/wiki/George_Abecassis"
],
"line": 10
},
{
"cells": [
"MRData.DriverTable.Drivers.givenName",
"George"
],
"line": 11
},
{
"cells": [
"MRData.DriverTable.Drivers.familyName",
"Abecassis"
],
"line": 12
},
{
"cells": [
"MRData.DriverTable.Drivers.dateOfBirth",
"1913-03-21"
],
"line": 13
},
{
"cells": [
"MRData.DriverTable.Drivers.nationality",
"British"
],
"line": 14
}
],
"keyword": "And "
} }
], ],
"tags": [ "tags": [
...@@ -46,10 +124,10 @@ ...@@ -46,10 +124,10 @@
] ]
} }
], ],
"name": "get the location data by country and zip code", "name": "Get driver\u0027s details",
"description": "", "description": "",
"id": "get-the-location-data-by-country-and-zip-code", "id": "get-driver\u0027s-details",
"keyword": "Feature", "keyword": "Feature",
"uri": "features/Sample.feature" "uri": "features/drivers.feature"
} }
] ]
\ No newline at end of file
...@@ -73,5 +73,17 @@ ...@@ -73,5 +73,17 @@
<artifactId>commons-logging</artifactId> <artifactId>commons-logging</artifactId>
<version>1.1.1</version> <version>1.1.1</version>
</dependency> </dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>2.22.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.1</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
package com.qa.stepdefinition;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.Matchers.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.testng.Assert;
import com.qa.utilities.Util;
import cucumber.api.DataTable;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.restassured.response.Response;
import io.restassured.response.ValidatableResponse;
import io.restassured.specification.RequestSpecification;
import wiremock.com.fasterxml.jackson.databind.ObjectMapper;
public class Drivers_get_steps {
private RequestSpecification request;
private Response response;
private ValidatableResponse json;
private String ENDPOINT_GET_DRIVER = "http://ergast.com/api/f1/drivers";
final static Logger logger = Logger.getLogger(Drivers_get_steps.class);
Util util =new Util();
String driverId;
@Given("^a driver exists with driver id \"([^\"]*)\"$")
public void a_driver_exists_with_driver_id(String driverid) throws Throwable {
driverId = driverid;
}
@When("^a driver details is retrieved by driver id$")
public void a_driver_details_is_retrieved_by_driver_id() throws Throwable {
response = util.get_driver(driverId);
System.out.println("response: " + response.prettyPrint());
}
@Then("^the status code is (\\d+)$")
public void the_status_code_is(int statusCode) throws Throwable {
json = response.then().statusCode(statusCode);
logger.info(statusCode);
}
@Then("^response includes the following$")
public void response_includes_the_following(Map<String,String> responseFields) throws Throwable {
for (Map.Entry<String, String> data : responseFields.entrySet()) {
if(StringUtils.isNumeric(data.getValue())){
json.body(data.getKey(), containsInAnyOrder(Integer.parseInt(data.getValue())));
}
else{
json.body(data.getKey(), containsInAnyOrder(data.getValue()));
}
}
}
}
package com.qa.stepdefinition;
import org.apache.log4j.Logger;
import org.testng.annotations.Test;
public class SampleSteps {
final static Logger logger = Logger.getLogger(SampleSteps.class);
@Test
public static void test() {
logger.info("It works");
}
}
...@@ -3,8 +3,13 @@ package com.qa.testrunner; ...@@ -3,8 +3,13 @@ package com.qa.testrunner;
import cucumber.api.CucumberOptions; import cucumber.api.CucumberOptions;
import cucumber.api.testng.AbstractTestNGCucumberTests; import cucumber.api.testng.AbstractTestNGCucumberTests;
@CucumberOptions(tags= "@sanity",glue = "classpath:/com-nisum-poc/src/test/java/com/qa/stepdefinition", strict = false, features = "classpath:features", format= {"json:com-nisum-poc/target/cucumberreports.json"}) @CucumberOptions(
public class TestRunner extends AbstractTestNGCucumberTests{ tags = "@sanity",
glue = "classpath:com/qa/stepdefinition",
} features = "classpath:features",
strict = false,
plugin = { "pretty","html:target/cucumber-reports" },
monochrome = true)
public class TestRunner extends AbstractTestNGCucumberTests {
}
...@@ -67,4 +67,10 @@ public class RestUtil { ...@@ -67,4 +67,10 @@ public class RestUtil {
public static void setGetResourceUri(String resourceuri) { public static void setGetResourceUri(String resourceuri) {
RestAssured.when().get(resourceuri); RestAssured.when().get(resourceuri);
} }
public static Response setGETEndPoint(String baseuri,String resourceuri,String driverId) {
return request.when().baseUri(baseuri).get(resourceuri+"/"+driverId+".json");
}
public static void setpathParams(String driverId) {
request.pathParams("driverId",driverId+".json");
}
} }
...@@ -30,5 +30,12 @@ public class Util { ...@@ -30,5 +30,12 @@ public class Util {
Response response = RestUtil.setPostwebserviceUrl(getValue("employee_base_uri"), getValue("employee_service_resurce_POST")); Response response = RestUtil.setPostwebserviceUrl(getValue("employee_base_uri"), getValue("employee_service_resurce_POST"));
return response; return response;
} }
public Response get_driver(String driverId) {
RestUtil.setContentType(getValue("content_JSON_type"));
//RestUtil.setpathParams(driverId);
return RestUtil.setGETEndPoint(getValue("driver_base_uri"),getValue("driver_resources_uri"),driverId);
}
} }
package com.qa.utilities;
import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.client.WireMock;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
import org.testng.annotations.Test;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
public class WireMockTest {
@Test
public void wireMockTest() {
WireMockServer wireMockServer = new WireMockServer(options().port(8089));
wireMockServer.start();
}
}
...@@ -5,3 +5,5 @@ content_JSON_type= application/json ...@@ -5,3 +5,5 @@ content_JSON_type= application/json
content_xml_type= application/xml content_xml_type= application/xml
employee_service_resurce_GET = /api/v1/employees employee_service_resurce_GET = /api/v1/employees
employee_service_resurce_POST = /api/v1/create employee_service_resurce_POST = /api/v1/create
driver_base_uri = http://ergast.com/
driver_resources_uri = api/f1/drivers
Feature: Get driver's details
@sanity
Scenario: Get details of drivers by driver id
Given a driver exists with driver id "abecassis"
When a driver details is retrieved by driver id
Then the status code is 200
And response includes the following
|MRData.DriverTable.Drivers.driverId | abecassis |
|MRData.DriverTable.Drivers.url | http://en.wikipedia.org/wiki/George_Abecassis |
|MRData.DriverTable.Drivers.givenName | George|
|MRData.DriverTable.Drivers.familyName | Abecassis |
|MRData.DriverTable.Drivers.dateOfBirth | 1913-03-21 |
|MRData.DriverTable.Drivers.nationality | British |
\ No newline at end of file
Feature: get the location data by country and zip code Feature: To post Employee data
@sanity @sanity
Scenario: call api and get the location data of country US and zip code 90210 Scenario: post empployee correct details and assert response
When employee data is uploaded through webservice When employee data is uploaded through webservice
Then verify the success status code 200 Then verify the success status code 200
And verify employee_id is generated And verify employee_id is generated
@sanity @sanity
Scenario: call api and get the location data of country US and zip code 90210 Scenario: post empployee incorrect details and assert response
When wrong employee data is uploaded through webservice When wrong employee data is uploaded through webservice
Then verify the success status code 200 Then verify the success status code 200
And verify error message is generated And verify error message is generated
......
...@@ -3,7 +3,7 @@ log4j.rootLogger=INFO,file ...@@ -3,7 +3,7 @@ log4j.rootLogger=INFO,file
#Direct log message to a log file #Direct log message to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=D:\\Data_Projects\\Content.log log4j.appender.file.File=D:\com_nisum_poc\RestAssured.log
log4j.appender.file.MaxFileSize=10MB log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.MaxBackupIndex=10 log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout=org.apache.log4j.PatternLayout
......
var CucumberHTML = {};
CucumberHTML.DOMFormatter = function(rootNode) {
var currentUri;
var currentFeature;
var currentElement;
var currentSteps;
var currentStepIndex;
var currentStep;
var $templates = $(CucumberHTML.templates);
this.uri = function(uri) {
currentUri = uri;
};
this.feature = function(feature) {
currentFeature = blockElement(rootNode, feature, 'feature');
};
this.background = function(background) {
currentElement = featureElement(background, 'background');
currentStepIndex = 1;
};
this.scenario = function(scenario) {
currentElement = featureElement(scenario, 'scenario');
currentStepIndex = 1;
};
this.scenarioOutline = function(scenarioOutline) {
currentElement = featureElement(scenarioOutline, 'scenario_outline');
currentStepIndex = 1;
};
this.step = function(step) {
var stepElement = $('.step', $templates).clone();
stepElement.appendTo(currentSteps);
populate(stepElement, step, 'step');
if (step.doc_string) {
docString = $('.doc_string', $templates).clone();
docString.appendTo(stepElement);
// TODO: use a syntax highlighter based on the content_type
docString.text(step.doc_string.value);
}
if (step.rows) {
dataTable = $('.data_table', $templates).clone();
dataTable.appendTo(stepElement);
var tBody = dataTable.find('tbody');
$.each(step.rows, function(index, row) {
var tr = $('<tr></tr>').appendTo(tBody);
$.each(row.cells, function(index, cell) {
var td = $('<td>' + cell + '</td>').appendTo(tBody);
});
});
}
};
this.examples = function(examples) {
var examplesElement = blockElement(currentElement.children('details'), examples, 'examples');
var examplesTable = $('.examples_table', $templates).clone();
examplesTable.appendTo(examplesElement.children('details'));
$.each(examples.rows, function(index, row) {
var parent = index == 0 ? examplesTable.find('thead') : examplesTable.find('tbody');
var tr = $('<tr></tr>').appendTo(parent);
$.each(row.cells, function(index, cell) {
var td = $('<td>' + cell + '</td>').appendTo(tr);
});
});
};
this.match = function(match) {
currentStep = currentSteps.find('li:nth-child(' + currentStepIndex + ')');
currentStepIndex++;
};
this.result = function(result) {
currentStep.addClass(result.status);
if (result.status == 'failed') {
populateStepError(currentStep, result.error_message);
}
currentElement.addClass(result.status);
var isLastStep = currentSteps.find('li:nth-child(' + currentStepIndex + ')').length == 0;
if (isLastStep) {
if (currentSteps.find('.failed').length == 0) {
// No failed steps. Collapse it.
currentElement.find('details').removeAttr('open');
} else {
currentElement.find('details').attr('open', 'open');
}
}
};
this.embedding = function(mimeType, data) {
if (mimeType.match(/^image\//))
{
currentStep.append('<img src="' + data + '">');
}
else if (mimeType.match(/^video\//))
{
currentStep.append('<video src="' + data + '" type="' + mimeType + '" autobuffer controls>Your browser doesn\'t support video.</video>');
}
else if (mimeType.match(/^text\//))
{
this.write(data);
}
};
this.write = function(text) {
currentStep.append('<pre class="embedded-text">' + text + '</pre>');
};
this.before = function(before) {
if(before.status != 'passed') {
currentElement = featureElement({keyword: 'Before', name: '', description: ''}, 'before');
currentStepIndex = 1;
populateStepError($('details', currentElement), before.error_message);
}
};
this.after = function(after) {
if(after.status != 'passed') {
currentElement = featureElement({keyword: 'After', name: '', description: ''}, 'after');
currentStepIndex++;
populateStepError($('details', currentElement), after.error_message);
}
};
function featureElement(statement, itemtype) {
var e = blockElement(currentFeature.children('details'), statement, itemtype);
currentSteps = $('.steps', $templates).clone();
currentSteps.appendTo(e.children('details'));
return e;
}
function blockElement(parent, statement, itemtype) {
var e = $('.blockelement', $templates).clone();
e.appendTo(parent);
return populate(e, statement, itemtype);
}
function populate(e, statement, itemtype) {
populateTags(e, statement.tags);
populateComments(e, statement.comments);
e.find('.keyword').text(statement.keyword);
e.find('.name').text(statement.name);
e.find('.description').text(statement.description);
e.attr('itemtype', 'http://cukes.info/microformat/' + itemtype);
e.addClass(itemtype);
return e;
}
function populateComments(e, comments) {
if (comments !== undefined) {
var commentsNode = $('.comments', $templates).clone().prependTo(e.find('.header'));
$.each(comments, function(index, comment) {
var commentNode = $('.comment', $templates).clone().appendTo(commentsNode);
commentNode.text(comment.value);
});
}
}
function populateTags(e, tags) {
if (tags !== undefined) {
var tagsNode = $('.tags', $templates).clone().prependTo(e.find('.header'));
$.each(tags, function(index, tag) {
var tagNode = $('.tag', $templates).clone().appendTo(tagsNode);
tagNode.text(tag.name);
});
}
}
function populateStepError(e, error) {
if (error !== undefined) {
errorNode = $('.error', $templates).clone().appendTo(e);
errorNode.text(error);
}
}
};
CucumberHTML.templates = '<div>\
<section class="blockelement" itemscope>\
<details open>\
<summary class="header">\
<span class="keyword" itemprop="keyword">Keyword</span>: <span itemprop="name" class="name">This is the block name</span>\
</summary>\
<div itemprop="description" class="description">The description goes here</div>\
</details>\
</section>\
\
<ol class="steps"></ol>\
\
<ol>\
<li class="step"><span class="keyword" itemprop="keyword">Keyword</span><span class="name" itemprop="name">Name</span></li>\
</ol>\
\
<pre class="doc_string"></pre>\
\
<pre class="error"></pre>\
\
<table class="data_table">\
<tbody>\
</tbody>\
</table>\
\
<table class="examples_table">\
<thead></thead>\
<tbody></tbody>\
</table>\
\
<section class="embed">\
<img itemprop="screenshot" class="screenshot" />\
</section>\
<div class="tags"></div>\
<span class="tag"></span>\
<div class="comments"></div>\
<div class="comment"></div>\
<div>';
if (typeof module !== 'undefined') {
module.exports = CucumberHTML;
} else if (typeof define !== 'undefined') {
define([], function() { return CucumberHTML; });
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cucumber Features</title>
<link href="style.css" rel="stylesheet">
<script src="jquery-1.8.2.min.js"></script>
<script src="formatter.js"></script>
<script src="report.js"></script>
</head>
<body>
<div class="cucumber-report"></div>
</body>
</html>
This diff is collapsed.
$(document).ready(function() {var formatter = new CucumberHTML.DOMFormatter($('.cucumber-report'));formatter.uri("features/Drivers.feature");
formatter.feature({
"line": 1,
"name": "Get driver\u0027s details",
"description": "",
"id": "get-driver\u0027s-details",
"keyword": "Feature"
});
formatter.scenario({
"line": 4,
"name": "Get details of drivers by driver id",
"description": "",
"id": "get-driver\u0027s-details;get-details-of-drivers-by-driver-id",
"type": "scenario",
"keyword": "Scenario",
"tags": [
{
"line": 3,
"name": "@sanity"
}
]
});
formatter.step({
"line": 5,
"name": "a driver exists with driver id \"abecassis\"",
"keyword": "Given "
});
formatter.step({
"line": 6,
"name": "a driver details is retrieved by driver id",
"keyword": "When "
});
formatter.step({
"line": 7,
"name": "the status code is 200",
"keyword": "Then "
});
formatter.step({
"line": 8,
"name": "response includes the following",
"rows": [
{
"cells": [
"MRData.DriverTable.Drivers.driverId",
"abecassis"
],
"line": 9
},
{
"cells": [
"MRData.DriverTable.Drivers.url",
"http://en.wikipedia.org/wiki/George_Abecassis"
],
"line": 10
},
{
"cells": [
"MRData.DriverTable.Drivers.givenName",
"George"
],
"line": 11
},
{
"cells": [
"MRData.DriverTable.Drivers.familyName",
"Abecassis"
],
"line": 12
},
{
"cells": [
"MRData.DriverTable.Drivers.dateOfBirth",
"1913-03-21"
],
"line": 13
},
{
"cells": [
"MRData.DriverTable.Drivers.nationality",
"British"
],
"line": 14
}
],
"keyword": "And "
});
formatter.match({
"arguments": [
{
"val": "abecassis",
"offset": 32
}
],
"location": "Drivers_get_steps.a_driver_exists_with_driver_id(String)"
});
formatter.result({
"duration": 125082267,
"status": "passed"
});
formatter.match({
"location": "Drivers_get_steps.a_driver_details_is_retrieved_by_driver_id()"
});
formatter.result({
"duration": 1425729245,
"status": "passed"
});
formatter.match({
"arguments": [
{
"val": "200",
"offset": 19
}
],
"location": "Drivers_get_steps.the_status_code_is(int)"
});
formatter.result({
"duration": 27740441,
"status": "passed"
});
formatter.match({
"location": "Drivers_get_steps.response_includes_the_following(String,String\u003e)"
});
formatter.result({
"duration": 330423683,
"status": "passed"
});
formatter.uri("features/Sample.feature");
formatter.feature({
"line": 1,
"name": "To post Employee data",
"description": "",
"id": "to-post-employee-data",
"keyword": "Feature"
});
formatter.scenario({
"line": 4,
"name": "post empployee correct details and assert response",
"description": "",
"id": "to-post-employee-data;post-empployee-correct-details-and-assert-response",
"type": "scenario",
"keyword": "Scenario",
"tags": [
{
"line": 3,
"name": "@sanity"
}
]
});
formatter.step({
"line": 6,
"name": "employee data is uploaded through webservice",
"keyword": "When "
});
formatter.step({
"line": 7,
"name": "verify the success status code 200",
"keyword": "Then "
});
formatter.step({
"line": 8,
"name": "verify employee_id is generated",
"keyword": "And "
});
formatter.match({
"location": "Employee_post_steps.employee_data_is_uploaded_through_webservice()"
});
formatter.result({
"duration": 248827243,
"status": "passed"
});
formatter.match({
"arguments": [
{
"val": "200",
"offset": 31
}
],
"location": "Employee_post_steps.verify_the_success_status_code(int)"
});
formatter.result({
"duration": 348677,
"status": "passed"
});
formatter.match({
"location": "Employee_post_steps.verify_employee_id_is_generated()"
});
formatter.result({
"duration": 13236089,
"error_message": "java.lang.AssertionError: 1 expectation failed.\nResponse body doesn\u0027t match expectation.\nExpected: a string containing \"id\"\n Actual: {\"error\":{\"text\":SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry \u0027testfrtysio\u0027 for key \u0027employee_name_unique\u0027}}\n\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\n\tat org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)\n\tat org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)\n\tat org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)\n\tat io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:471)\n\tat io.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call(Unknown Source)\n\tat io.restassured.internal.ResponseSpecificationImpl.validateResponseIfRequired(ResponseSpecificationImpl.groovy:643)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)\n\tat org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)\n\tat io.restassured.internal.ResponseSpecificationImpl.content(ResponseSpecificationImpl.groovy:94)\n\tat io.restassured.specification.ResponseSpecification$content$2.callCurrent(Unknown Source)\n\tat org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)\n\tat org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)\n\tat io.restassured.internal.ResponseSpecificationImpl.body(ResponseSpecificationImpl.groovy:244)\n\tat io.restassured.internal.ValidatableResponseOptionsImpl.body(ValidatableResponseOptionsImpl.java:262)\n\tat com.qa.stepdefinition.Employee_post_steps.verify_employee_id_is_generated(Employee_post_steps.java:36)\n\tat ✽.And verify employee_id is generated(features/Sample.feature:8)\n",
"status": "failed"
});
formatter.scenario({
"line": 11,
"name": "post empployee incorrect details and assert response",
"description": "",
"id": "to-post-employee-data;post-empployee-incorrect-details-and-assert-response",
"type": "scenario",
"keyword": "Scenario",
"tags": [
{
"line": 10,
"name": "@sanity"
}
]
});
formatter.step({
"line": 12,
"name": "wrong employee data is uploaded through webservice",
"keyword": "When "
});
formatter.step({
"line": 13,
"name": "verify the success status code 200",
"keyword": "Then "
});
formatter.step({
"line": 14,
"name": "verify error message is generated",
"keyword": "And "
});
formatter.match({
"location": "Employee_post_steps.wrong_employee_data_is_uploaded_through_webservice()"
});
formatter.result({
"duration": 254796703,
"status": "passed"
});
formatter.match({
"arguments": [
{
"val": "200",
"offset": 31
}
],
"location": "Employee_post_steps.verify_the_success_status_code(int)"
});
formatter.result({
"duration": 421221,
"status": "passed"
});
formatter.match({
"location": "Employee_post_steps.verify_error_message_is_generated()"
});
formatter.result({
"duration": 985450,
"status": "passed"
});
});
\ No newline at end of file
.cucumber-report .body {
font-family: Helvetica,Arial,sans-serif;
}
.cucumber-report .keyword {
font-weight: bold;
}
.cucumber-report .description {
font-style: italic;
margin-left: 20px;
}
.cucumber-report details > section {
margin-left: 20px;
}
.cucumber-report ol.steps {
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
}
.cucumber-report .step .embedded-text {
background: #dddddd;
}
.cucumber-report .doc_string {
margin: 0 0 0 20px;
}
.cucumber-report table {
border-collapse: collapse;
border: 1px;
border-style: solid;
}
.cucumber-report td, .cucumber-report th {
border: 1px;
border-style: solid;
padding-left: 4px;
padding-right: 4px;
}
.cucumber-report table {
margin-left: 20px;
}
.cucumber-report thead {
background-color: #C0C0C0;
}
.cucumber-report .passed {
background-color: #C5D88A;
}
.cucumber-report .undefined, .cucumber-report .pending {
background-color: #EAEC2D;
}
.cucumber-report .skipped {
background-color: #2DEAEC;
}
.cucumber-report .failed {
background-color: #D88A8A;
}
.cucumber-report .tags {
display: inline;
}
.cucumber-report .tag {
margin-right: 0.25em;
color: #246ac1;
}
.cucumber-report .comments {
display: inline;
}
.cucumber-report .comment {
margin 0;
padding 0;
}
.cucumber-report .error {
margin: .2em .75em;
padding: .2em;
border: 1px solid #900;
background-color: #EDBBBB;
}
#cucumber-templates {
display: none;
}
#Generated by Maven
#Mon Jun 17 11:53:50 PDT 2019
version=0.0.1-SNAPSHOT
groupId=com-nisum-poc
artifactId=com-nisum-poc
com/qa/stepdefinition/Drivers.class
com/qa/utilities/WireMockTest.class
com/qa/stepdefinition/Employee_post_steps.class
com/qa/testrunner/TestRunner.class
com/qa/stepdefinition/DriverTable.class
com/qa/stepdefinition/DriverDetails.class
com/qa/utilities/RestUtil.class
com/qa/stepdefinition/MRData.class
com/qa/utilities/Util.class
com/qa/stepdefinition/Drivers_get_steps.class
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/utilities/WireMockTest.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/stepdefinition/Employee_post_steps.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/stepdefinition/DriverTable.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/utilities/Util.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/stepdefinition/Drivers_get_steps.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/stepdefinition/Drivers.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/utilities/RestUtil.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/stepdefinition/DriverDetails.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/stepdefinition/MRData.java
/Users/ashrivastava/eclipse-workspace/com-nisum-poc/src/test/java/com/qa/testrunner/TestRunner.java
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitXMLReporter -->
<testsuite hostname="NIS1633-FRE.local" name="Command line test" tests="2" failures="1" timestamp="19 Jun 2019 19:13:54 GMT" time="2.786" errors="0">
<testcase name="feature" time="1.991" classname="com.qa.testrunner.TestRunner"/>
<testcase name="feature" time="0.496" classname="com.qa.testrunner.TestRunner">
<failure type="cucumber.runtime.CucumberException" message="java.lang.AssertionError: 1 expectation failed.
Response body doesn&amp;apos;t match expectation.
Expected: a string containing &amp;quot;id&amp;quot;
Actual: {&amp;quot;error&amp;quot;:{&amp;quot;text&amp;quot;:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &amp;apos;testfrtysio&amp;apos; for key &amp;apos;employee_name_unique&amp;apos;}}
">
<![CDATA[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]]>
</failure>
</testcase> <!-- feature -->
</testsuite> <!-- Command line test -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite verbose="0" name="Failed suite [Command line suite]">
<test name="Command line test(failed)">
<classes>
<class name="com.qa.testrunner.TestRunner">
<methods>
<include name="setUpClass"/>
<include name="feature" invocation-numbers="1"/>
<include name="tearDownClass"/>
</methods>
</class> <!-- com.qa.testrunner.TestRunner -->
</classes>
</test> <!-- Command line test(failed) -->
</suite> <!-- Failed suite [Command line suite] -->
This diff is collapsed.
-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 18.031 sec <<< FAILURE!
feature(com.qa.testrunner.TestRunner) Time elapsed: 0.498 sec <<< FAILURE!
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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:159)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestNG Report</title><style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}</style></head><body><table><tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr><tr><th colspan="7">Command line suite</th></tr><tr><td><a href="#t0">Command line test</a></td><td class="num">1</td><td class="num">0</td><td class="num attn">1</td><td class="num">2,786</td><td></td><td></td></tr></table><table><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Command line suite</th></tr></tbody><tbody id="t0"><tr><th colspan="4">Command line test &#8212; failed</th></tr><tr class="failedeven"><td rowspan="1">com.qa.testrunner.TestRunner</td><td><a href="#m0">feature</a></td><td rowspan="1">1560971629119</td><td rowspan="1">496</td></tr><tr><th colspan="4">Command line test &#8212; passed</th></tr><tr class="passedeven"><td rowspan="1">com.qa.testrunner.TestRunner</td><td><a href="#m1">feature</a></td><td rowspan="1">1560971627127</td><td rowspan="1">1991</td></tr></tbody></table><h2>Command line test</h2><h3 id="m0">com.qa.testrunner.TestRunner#feature</h3><table class="result"><tr class="param"><th>Parameter #1</th></tr><tr class="param stripe"><td>To post Employee data</td></tr><tr><th>Exception</th></tr><tr><td><div class="stacktrace">cucumber.runtime.CucumberException: java.lang.AssertionError: 1 expectation failed.
Response body doesn&apos;t match expectation.
Expected: a string containing &quot;id&quot;
Actual: {&quot;error&quot;:{&quot;text&quot;:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &apos;testfrtysio&apos; for key &apos;employee_name_unique&apos;}}
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&apos;t match expectation.
Expected: a string containing &quot;id&quot;
Actual: {&quot;error&quot;:{&quot;text&quot;:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &apos;testfrtysio&apos; for key &apos;employee_name_unique&apos;}}
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</div></td></tr></table><p class="totop"><a href="#summary">back to summary</a></p><h3 id="m1">com.qa.testrunner.TestRunner#feature</h3><table class="result"><tr class="param"><th>Parameter #1</th></tr><tr class="param stripe"><td>Get driver&apos;s details</td></tr></table><p class="totop"><a href="#summary">back to summary</a></p></body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite hostname="NIS1633-FRE.local" name="com.qa.testrunner.TestRunner" tests="2" failures="0" timestamp="19 Jun 2019 19:13:54 GMT" time="2.487" errors="1">
<testcase name="feature" time="0.496" classname="com.qa.testrunner.TestRunner">
<error type="cucumber.runtime.CucumberException" message="java.lang.AssertionError: 1 expectation failed.
Response body doesn&#039;t match expectation.
Expected: a string containing &quot;id&quot;
Actual: {&quot;error&quot;:{&quot;text&quot;:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &#039;testfrtysio&#039; for key &#039;employee_name_unique&#039;}}
">
<![CDATA[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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:159)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
]]>
</error>
</testcase> <!-- feature -->
<testcase name="feature" time="1.991" classname="com.qa.testrunner.TestRunner"/>
</testsuite> <!-- com.qa.testrunner.TestRunner -->
[SuiteResult context=Command line test]
\ No newline at end of file
<table border='1'>
<tr>
<th>Class name</th>
<th>Method name</th>
<th>Groups</th>
</tr><tr>
<td>com.qa.testrunner.TestRunner</td>
<td>&nbsp;</td><td>&nbsp;</td></tr>
<tr>
<td align='center' colspan='3'>@Test</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>feature</td>
<td>cucumber </td>
</tr>
<tr>
<td align='center' colspan='3'>@BeforeClass</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>setUpClass</td>
<td>&nbsp;</td></tr>
<tr>
<td align='center' colspan='3'>@BeforeMethod</td>
</tr>
<tr>
<td align='center' colspan='3'>@AfterMethod</td>
</tr>
<tr>
<td align='center' colspan='3'>@AfterClass</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>tearDownClass</td>
<td>&nbsp;</td></tr>
</table>
<h2>Groups used for this test run</h2><table border="1">
<tr> <td align="center"><b>Group name</b></td><td align="center"><b>Methods</b></td></tr><tr><td>cucumber</td><td>AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]<br/></td></tr>
</table>
<html><head><title>Results for Command line suite</title></head>
<frameset cols="26%,74%">
<frame src="toc.html" name="navFrame">
<frame src="main.html" name="mainFrame">
</frameset>
</html>
<html><head><title>Results for Command line suite</title></head>
<body>Select a result on the left-hand pane.</body></html>
<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Command line suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
<table border="1">
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
<tr bgcolor="62ada6"> <td>19/06/19 12:13:47</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]">feature</td>
<td>main@1165897474</td> <td></td> </tr>
<tr bgcolor="62ada6"> <td>19/06/19 12:13:49</td> <td>1992</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]">feature</td>
<td>main@1165897474</td> <td></td> </tr>
<tr bgcolor="62ada6"> <td>19/06/19 12:13:46</td> <td>-279</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;AbstractTestNGCucumberTests.setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]">&gt;&gt;setUpClass</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1165897474</td> <td></td> </tr>
<tr bgcolor="62ada6"> <td>19/06/19 12:13:49</td> <td>2490</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractTestNGCucumberTests.tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]">&lt;&lt;tearDownClass</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1165897474</td> <td></td> </tr>
</table>
<h2>Methods that were not run</h2><table>
</table>
\ No newline at end of file
<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Command line suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
<table border="1">
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
<tr bgcolor="62ada6"> <td>19/06/19 12:13:46</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;AbstractTestNGCucumberTests.setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]">&gt;&gt;setUpClass</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1165897474</td> <td></td> </tr>
<tr bgcolor="62ada6"> <td>19/06/19 12:13:47</td> <td>279</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]">feature</td>
<td>main@1165897474</td> <td></td> </tr>
<tr bgcolor="62ada6"> <td>19/06/19 12:13:49</td> <td>2271</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]">feature</td>
<td>main@1165897474</td> <td></td> </tr>
<tr bgcolor="62ada6"> <td>19/06/19 12:13:49</td> <td>2769</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractTestNGCucumberTests.tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]">&lt;&lt;tearDownClass</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1165897474</td> <td></td> </tr>
</table>
<h2>Reporter output</h2><table></table>
\ No newline at end of file
<html><head><title>testng.xml for Command line suite</title></head><body><tt>&lt;?xml&nbsp;version="1.0"&nbsp;encoding="UTF-8"?&gt;<br/>&lt;!DOCTYPE&nbsp;suite&nbsp;SYSTEM&nbsp;"http://testng.org/testng-1.0.dtd"&gt;<br/>&lt;suite&nbsp;verbose="0"&nbsp;name="Command&nbsp;line&nbsp;suite"&gt;<br/>&nbsp;&nbsp;&lt;test&nbsp;name="Command&nbsp;line&nbsp;test"&nbsp;preserve-order="false"&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;classes&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;class&nbsp;name="com.qa.testrunner.TestRunner"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;class&nbsp;name="com.qa.utilities.WireMockTest"/&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/classes&gt;<br/>&nbsp;&nbsp;&lt;/test&gt;&nbsp;&lt;!--&nbsp;Command&nbsp;line&nbsp;test&nbsp;--&gt;<br/>&lt;/suite&gt;&nbsp;&lt;!--&nbsp;Command&nbsp;line&nbsp;suite&nbsp;--&gt;<br/></tt></body></html>
\ No newline at end of file
<html>
<head>
<title>Results for Command line suite</title>
<link href="../testng.css" rel="stylesheet" type="text/css" />
<link href="../my-testng.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3><p align="center">Results for<br/><em>Command line suite</em></p></h3>
<table border='1' width='100%'>
<tr valign='top'>
<td>1 test</td>
<td><a target='mainFrame' href='classes.html'>1 class</a></td>
<td>1 method:<br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods.html'>chronological</a><br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods-alphabetical.html'>alphabetical</a><br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods-not-run.html'>not run (0)</a></td>
</tr>
<tr>
<td><a target='mainFrame' href='groups.html'>1 group</a></td>
<td><a target='mainFrame' href='reporter-output.html'>reporter output</a></td>
<td><a target='mainFrame' href='testng.xml.html'>testng.xml</a></td>
</tr></table>
<table width='100%' class='test-failed'>
<tr><td>
<table style='width: 100%'><tr><td valign='top'>Command line test (1/1/0)</td><td valign='top' align='right'>
<a href='Command line test.html' target='mainFrame'>Results</a>
</td></tr></table>
</td></tr><p/>
</table>
</body></html>
\ No newline at end of file
<html>
<head><title>Test results</title><link href="./testng.css" rel="stylesheet" type="text/css" />
<link href="./my-testng.css" rel="stylesheet" type="text/css" />
</head><body>
<h2><p align='center'>Test results</p></h2>
<table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr>
<tr align='center' class='invocation-failed'><td><em>Total</em></td><td><em>1</em></td><td><em>1</em></td><td><em>0</em></td><td>&nbsp;</td></tr>
<tr align='center' class='invocation-failed'><td><a href='Command line suite/index.html'>Command line suite</a></td>
<td>1</td><td>1</td><td>0</td><td><a href='Command line suite/testng.xml.html'>Link</a></td></tr></table></body></html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite verbose="0" name="Failed suite [Command line suite]">
<test name="Command line test(failed)">
<classes>
<class name="com.qa.testrunner.TestRunner">
<methods>
<include name="setUpClass"/>
<include name="feature" invocation-numbers="1"/>
<include name="tearDownClass"/>
</methods>
</class> <!-- com.qa.testrunner.TestRunner -->
</classes>
</test> <!-- Command line test(failed) -->
</suite> <!-- Failed suite [Command line suite] -->
body {
margin: 0px 0px 5px 5px;
}
ul {
margin: 0px;
}
li {
list-style-type: none;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.navigator-selected {
background: #ffa500;
}
.wrapper {
position: absolute;
top: 60px;
bottom: 0;
left: 400px;
right: 0;
overflow: auto;
}
.navigator-root {
position: absolute;
top: 60px;
bottom: 0;
left: 0;
width: 400px;
overflow-y: auto;
}
.suite {
margin: 0px 10px 10px 0px;
background-color: #fff8dc;
}
.suite-name {
padding-left: 10px;
font-size: 25px;
font-family: Times;
}
.main-panel-header {
padding: 5px;
background-color: #9FB4D9; //afeeee;
font-family: monospace;
font-size: 18px;
}
.main-panel-content {
padding: 5px;
margin-bottom: 10px;
background-color: #DEE8FC; //d0ffff;
}
.rounded-window {
border-radius: 10px;
border-style: solid;
border-width: 1px;
}
.rounded-window-top {
border-top-right-radius: 10px 10px;
border-top-left-radius: 10px 10px;
border-style: solid;
border-width: 1px;
overflow: auto;
}
.light-rounded-window-top {
border-top-right-radius: 10px 10px;
border-top-left-radius: 10px 10px;
}
.rounded-window-bottom {
border-style: solid;
border-width: 0px 1px 1px 1px;
border-bottom-right-radius: 10px 10px;
border-bottom-left-radius: 10px 10px;
overflow: auto;
}
.method-name {
font-size: 12px;
font-family: monospace;
}
.method-content {
border-style: solid;
border-width: 0px 0px 1px 0px;
margin-bottom: 10;
padding-bottom: 5px;
width: 80%;
}
.parameters {
font-size: 14px;
font-family: monospace;
}
.stack-trace {
white-space: pre;
font-family: monospace;
font-size: 12px;
font-weight: bold;
margin-top: 0px;
margin-left: 20px;
}
.testng-xml {
font-family: monospace;
}
.method-list-content {
margin-left: 10px;
}
.navigator-suite-content {
margin-left: 10px;
font: 12px 'Lucida Grande';
}
.suite-section-title {
margin-top: 10px;
width: 80%;
border-style: solid;
border-width: 1px 0px 0px 0px;
font-family: Times;
font-size: 18px;
font-weight: bold;
}
.suite-section-content {
list-style-image: url(bullet_point.png);
}
.top-banner-root {
position: absolute;
top: 0;
height: 45px;
left: 0;
right: 0;
padding: 5px;
margin: 0px 0px 5px 0px;
background-color: #0066ff;
font-family: Times;
color: #fff;
text-align: center;
}
.top-banner-title-font {
font-size: 25px;
}
.test-name {
font-family: 'Lucida Grande';
font-size: 16px;
}
.suite-icon {
padding: 5px;
float: right;
height: 20;
}
.test-group {
font: 20px 'Lucida Grande';
margin: 5px 5px 10px 5px;
border-width: 0px 0px 1px 0px;
border-style: solid;
padding: 5px;
}
.test-group-name {
font-weight: bold;
}
.method-in-group {
font-size: 16px;
margin-left: 80px;
}
table.google-visualization-table-table {
width: 100%;
}
.reporter-method-name {
font-size: 14px;
font-family: monospace;
}
.reporter-method-output-div {
padding: 5px;
margin: 0px 0px 5px 20px;
font-size: 12px;
font-family: monospace;
border-width: 0px 0px 0px 1px;
border-style: solid;
}
.ignored-class-div {
font-size: 14px;
font-family: monospace;
}
.ignored-methods-div {
padding: 5px;
margin: 0px 0px 5px 20px;
font-size: 12px;
font-family: monospace;
border-width: 0px 0px 0px 1px;
border-style: solid;
}
.border-failed {
border-top-left-radius: 10px 10px;
border-bottom-left-radius: 10px 10px;
border-style: solid;
border-width: 0px 0px 0px 10px;
border-color: #f00;
}
.border-skipped {
border-top-left-radius: 10px 10px;
border-bottom-left-radius: 10px 10px;
border-style: solid;
border-width: 0px 0px 0px 10px;
border-color: #edc600;
}
.border-passed {
border-top-left-radius: 10px 10px;
border-bottom-left-radius: 10px 10px;
border-style: solid;
border-width: 0px 0px 0px 10px;
border-color: #19f52d;
}
.times-div {
text-align: center;
padding: 5px;
}
.suite-total-time {
font: 16px 'Lucida Grande';
}
.configuration-suite {
margin-left: 20px;
}
.configuration-test {
margin-left: 40px;
}
.configuration-class {
margin-left: 60px;
}
.configuration-method {
margin-left: 80px;
}
.test-method {
margin-left: 100px;
}
.chronological-class {
background-color: #0ccff;
border-style: solid;
border-width: 0px 0px 1px 1px;
}
.method-start {
float: right;
}
.chronological-class-name {
padding: 0px 0px 0px 5px;
color: #008;
}
.after, .before, .test-method {
font-family: monospace;
font-size: 14px;
}
.navigator-suite-header {
font-size: 22px;
margin: 0px 10px 5px 0px;
background-color: #deb887;
text-align: center;
}
.collapse-all-icon {
padding: 5px;
float: right;
}
$(document).ready(function() {
$('a.navigator-link').click(function() {
// Extract the panel for this link
var panel = getPanelName($(this));
// Mark this link as currently selected
$('.navigator-link').parent().removeClass('navigator-selected');
$(this).parent().addClass('navigator-selected');
showPanel(panel);
});
installMethodHandlers('failed');
installMethodHandlers('skipped');
installMethodHandlers('passed', true); // hide passed methods by default
$('a.method').click(function() {
showMethod($(this));
return false;
});
// Hide all the panels and display the first one (do this last
// to make sure the click() will invoke the listeners)
$('.panel').hide();
$('.navigator-link').first().click();
// Collapse/expand the suites
$('a.collapse-all-link').click(function() {
var contents = $('.navigator-suite-content');
if (contents.css('display') == 'none') {
contents.show();
} else {
contents.hide();
}
});
});
// The handlers that take care of showing/hiding the methods
function installMethodHandlers(name, hide) {
function getContent(t) {
return $('.method-list-content.' + name + "." + t.attr('panel-name'));
}
function getHideLink(t, name) {
var s = 'a.hide-methods.' + name + "." + t.attr('panel-name');
return $(s);
}
function getShowLink(t, name) {
return $('a.show-methods.' + name + "." + t.attr('panel-name'));
}
function getMethodPanelClassSel(element, name) {
var panelName = getPanelName(element);
var sel = '.' + panelName + "-class-" + name;
return $(sel);
}
$('a.hide-methods.' + name).click(function() {
var w = getContent($(this));
w.hide();
getHideLink($(this), name).hide();
getShowLink($(this), name).show();
getMethodPanelClassSel($(this), name).hide();
});
$('a.show-methods.' + name).click(function() {
var w = getContent($(this));
w.show();
getHideLink($(this), name).show();
getShowLink($(this), name).hide();
showPanel(getPanelName($(this)));
getMethodPanelClassSel($(this), name).show();
});
if (hide) {
$('a.hide-methods.' + name).click();
} else {
$('a.show-methods.' + name).click();
}
}
function getHashForMethod(element) {
return element.attr('hash-for-method');
}
function getPanelName(element) {
return element.attr('panel-name');
}
function showPanel(panelName) {
$('.panel').hide();
var panel = $('.panel[panel-name="' + panelName + '"]');
panel.show();
}
function showMethod(element) {
var hashTag = getHashForMethod(element);
var panelName = getPanelName(element);
showPanel(panelName);
var current = document.location.href;
var base = current.substring(0, current.indexOf('#'))
document.location.href = base + '#' + hashTag;
var newPosition = $(document).scrollTop() - 65;
$(document).scrollTop(newPosition);
}
function drawTable() {
for (var i = 0; i < suiteTableInitFunctions.length; i++) {
window[suiteTableInitFunctions[i]]();
}
for (var k in window.suiteTableData) {
var v = window.suiteTableData[k];
var div = v.tableDiv;
var data = v.tableData
var table = new google.visualization.Table(document.getElementById(div));
table.draw(data, {
showRowNumber : false
});
}
}
<?xml version="1.0" encoding="UTF-8"?>
<testng-results skipped="0" failed="1" total="2" passed="1">
<reporter-output>
</reporter-output>
<suite name="Command line suite" duration-ms="2786" started-at="2019-06-19T19:13:46Z" finished-at="2019-06-19T19:13:49Z">
<groups>
<group name="cucumber">
<method signature="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]" name="feature" class="cucumber.api.testng.AbstractTestNGCucumberTests"/>
</group> <!-- cucumber -->
</groups>
<test name="Command line test" duration-ms="2786" started-at="2019-06-19T19:13:46Z" finished-at="2019-06-19T19:13:49Z">
<class name="com.qa.testrunner.TestRunner">
<test-method status="PASS" signature="setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]" name="setUpClass" is-config="true" duration-ms="189" started-at="2019-06-19T12:13:46Z" finished-at="2019-06-19T12:13:47Z">
<reporter-output>
</reporter-output>
</test-method> <!-- setUpClass -->
<test-method status="PASS" signature="feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]" name="feature" duration-ms="1991" started-at="2019-06-19T12:13:47Z" description="Runs Cucumber Feature" data-provider="features" finished-at="2019-06-19T12:13:49Z">
<params>
<param index="0">
<value>
<![CDATA[Get driver's details]]>
</value>
</param>
</params>
<reporter-output>
</reporter-output>
</test-method> <!-- feature -->
<test-method status="FAIL" signature="feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]" name="feature" duration-ms="496" started-at="2019-06-19T12:13:49Z" description="Runs Cucumber Feature" data-provider="features" finished-at="2019-06-19T12:13:49Z">
<params>
<param index="0">
<value>
<![CDATA[To post Employee data]]>
</value>
</param>
</params>
<exception class="cucumber.runtime.CucumberException">
<message>
<![CDATA[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'}}
]]>
</message>
<full-stacktrace>
<![CDATA[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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:159)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
]]>
</full-stacktrace>
</exception> <!-- cucumber.runtime.CucumberException -->
<reporter-output>
</reporter-output>
</test-method> <!-- feature -->
<test-method status="PASS" signature="tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@5f375618]" name="tearDownClass" is-config="true" duration-ms="9" started-at="2019-06-19T12:13:49Z" finished-at="2019-06-19T12:13:49Z">
<reporter-output>
</reporter-output>
</test-method> <!-- tearDownClass -->
</class> <!-- com.qa.testrunner.TestRunner -->
</test> <!-- Command line test -->
</suite> <!-- Command line suite -->
</testng-results>
.invocation-failed, .test-failed { background-color: #DD0000; }
.invocation-percent, .test-percent { background-color: #006600; }
.invocation-passed, .test-passed { background-color: #00AA00; }
.invocation-skipped, .test-skipped { background-color: #CCCC00; }
.main-page {
font-size: x-large;
}
employee_base_uri= http://dummy.restapiexample.com
employee_correct_req_payload_loc= src/test/resources/requestPayload_employee/employee_post_req_payload.json
employee_wrong_req_payload_loc= src/test/resources/requestPayload_employee/wrong_employee_post_req_payload.json
content_JSON_type= application/json
content_xml_type= application/xml
employee_service_resurce_GET = /api/v1/employees
employee_service_resurce_POST = /api/v1/create
driver_base_uri = http://ergast.com/
driver_resources_uri = api/f1/drivers
Feature: Get driver's details
@sanity
Scenario: Get details of drivers by driver id
Given a driver exists with driver id "abecassis"
When a driver details is retrieved by driver id
Then the status code is 200
And response includes the following
|MRData.DriverTable.Drivers.driverId | abecassis |
|MRData.DriverTable.Drivers.url | http://en.wikipedia.org/wiki/George_Abecassis |
|MRData.DriverTable.Drivers.givenName | George|
|MRData.DriverTable.Drivers.familyName | Abecassis |
|MRData.DriverTable.Drivers.dateOfBirth | 1913-03-21 |
|MRData.DriverTable.Drivers.nationality | British |
\ No newline at end of file
Feature: get the location data by country and zip code Feature: To post Employee data
@sanity @sanity
Scenario: call api and get the location data of country US and zip code 90210 Scenario: post empployee correct details and assert response
Given The country and zip code is valid
When location data is retrieved by country code and zipcode. When employee data is uploaded through webservice
Then verify the status is successful Then verify the success status code 200
And verify employee_id is generated
@sanity
Scenario: post empployee incorrect details and assert response
When wrong employee data is uploaded through webservice
Then verify the success status code 200
And verify error message is generated
...@@ -3,7 +3,7 @@ log4j.rootLogger=INFO,file ...@@ -3,7 +3,7 @@ log4j.rootLogger=INFO,file
#Direct log message to a log file #Direct log message to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=D:\\Data_Projects\\Content.log log4j.appender.file.File=D:\com_nisum_poc\RestAssured.log
log4j.appender.file.MaxFileSize=10MB log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.MaxBackupIndex=10 log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout=org.apache.log4j.PatternLayout
......
{
"name":"testfrtysio",
"salary":"23000",
"age":"29"
}
\ No newline at end of file
{
"name":"testne1",
"salary":23,
"age":"23"
}
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitXMLReporter --> <!-- Generated by org.testng.reporters.JUnitXMLReporter -->
<testsuite hostname="NIS1633-FRE.local" name="Default test" tests="1" failures="0" timestamp="17 Jun 2019 19:16:53 GMT" time="0.255" errors="0"> <testsuite hostname="NIS1633-FRE.local" name="Default test" tests="2" failures="1" timestamp="19 Jun 2019 19:38:27 GMT" time="2.704" errors="0">
<testcase name="feature" time="0.013" classname="com.qa.testrunner.TestRunner"/> <testcase name="feature" time="1.935" classname="com.qa.testrunner.TestRunner"/>
<testcase name="feature" time="0.529" classname="com.qa.testrunner.TestRunner">
<failure type="cucumber.runtime.CucumberException" message="java.lang.AssertionError: 1 expectation failed.
Response body doesn&amp;apos;t match expectation.
Expected: a string containing &amp;quot;id&amp;quot;
Actual: {&amp;quot;error&amp;quot;:{&amp;quot;text&amp;quot;:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &amp;apos;testfrtysio&amp;apos; for key &amp;apos;employee_name_unique&amp;apos;}}
">
<![CDATA[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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
]]>
</failure>
</testcase> <!-- feature -->
</testsuite> <!-- Default test --> </testsuite> <!-- Default test -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Failed suite [Default suite]">
<test name="Default test(failed)">
<classes>
<class name="com.qa.testrunner.TestRunner">
<methods>
<include name="setUpClass"/>
<include name="feature" invocation-numbers="1"/>
<include name="tearDownClass"/>
</methods>
</class> <!-- com.qa.testrunner.TestRunner -->
</classes>
</test> <!-- Default test(failed) -->
</suite> <!-- Failed suite [Default suite] -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestNG Report</title><style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}</style></head><body><table><tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr><tr><th colspan="7">Default suite</th></tr><tr><td><a href="#t0">Default test</a></td><td class="num">1</td><td class="num">0</td><td class="num">0</td><td class="num">255</td><td></td><td></td></tr></table><table><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Default suite</th></tr></tbody><tbody id="t0"><tr><th colspan="4">Default test &#8212; passed</th></tr><tr class="passedeven"><td rowspan="1">com.qa.testrunner.TestRunner</td><td><a href="#m0">feature</a></td><td rowspan="1">1560799008738</td><td rowspan="1">13</td></tr></tbody></table><h2>Default test</h2><h3 id="m0">com.qa.testrunner.TestRunner#feature</h3><table class="result"><tr class="param"><th>Parameter #1</th></tr><tr class="param stripe"><td>get the location data by country and zip code</td></tr></table><p class="totop"><a href="#summary">back to summary</a></p></body></html> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestNG Report</title><style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}</style></head><body><table><tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr><tr><th colspan="7">Default suite</th></tr><tr><td><a href="#t0">Default test</a></td><td class="num">1</td><td class="num">0</td><td class="num attn">1</td><td class="num">2,704</td><td></td><td></td></tr></table><table><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Default suite</th></tr></tbody><tbody id="t0"><tr><th colspan="4">Default test &#8212; failed</th></tr><tr class="failedeven"><td rowspan="1">com.qa.testrunner.TestRunner</td><td><a href="#m0">feature</a></td><td rowspan="1">1560973101614</td><td rowspan="1">529</td></tr><tr><th colspan="4">Default test &#8212; passed</th></tr><tr class="passedeven"><td rowspan="1">com.qa.testrunner.TestRunner</td><td><a href="#m1">feature</a></td><td rowspan="1">1560973099678</td><td rowspan="1">1935</td></tr></tbody></table><h2>Default test</h2><h3 id="m0">com.qa.testrunner.TestRunner#feature</h3><table class="result"><tr class="param"><th>Parameter #1</th></tr><tr class="param stripe"><td>To post Employee data</td></tr><tr><th>Exception</th></tr><tr><td><div class="stacktrace">cucumber.runtime.CucumberException: java.lang.AssertionError: 1 expectation failed.
\ No newline at end of file Response body doesn&apos;t match expectation.
Expected: a string containing &quot;id&quot;
Actual: {&quot;error&quot;:{&quot;text&quot;:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &apos;testfrtysio&apos; for key &apos;employee_name_unique&apos;}}
at cucumber.api.testng.TestNGCucumberRunner.runCucumber(TestNGCucumberRunner.java:69)
at cucumber.api.testng.AbstractTestNGCucumberTests.feature(AbstractTestNGCucumberTests.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.AssertionError: 1 expectation failed.
Response body doesn&apos;t match expectation.
Expected: a string containing &quot;id&quot;
Actual: {&quot;error&quot;:{&quot;text&quot;:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &apos;testfrtysio&apos; for key &apos;employee_name_unique&apos;}}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
</div></td></tr></table><p class="totop"><a href="#summary">back to summary</a></p><h3 id="m1">com.qa.testrunner.TestRunner#feature</h3><table class="result"><tr class="param"><th>Parameter #1</th></tr><tr class="param stripe"><td>Get driver&apos;s details</td></tr></table><p class="totop"><a href="#summary">back to summary</a></p></body></html>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter --> <!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite hostname="NIS1633-FRE.local" name="com.qa.testrunner.TestRunner" tests="1" failures="0" timestamp="17 Jun 2019 19:16:53 GMT" time="0.013" errors="0"> <testsuite hostname="NIS1633-FRE.local" name="com.qa.testrunner.TestRunner" tests="2" failures="0" timestamp="19 Jun 2019 19:38:27 GMT" time="2.464" errors="1">
<testcase name="feature" time="0.013" classname="com.qa.testrunner.TestRunner"/> <testcase name="feature" time="1.935" classname="com.qa.testrunner.TestRunner"/>
<testcase name="feature" time="0.529" classname="com.qa.testrunner.TestRunner">
<error type="cucumber.runtime.CucumberException" message="java.lang.AssertionError: 1 expectation failed.
Response body doesn&#039;t match expectation.
Expected: a string containing &quot;id&quot;
Actual: {&quot;error&quot;:{&quot;text&quot;:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &#039;testfrtysio&#039; for key &#039;employee_name_unique&#039;}}
">
<![CDATA[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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
]]>
</error>
</testcase> <!-- feature -->
</testsuite> <!-- com.qa.testrunner.TestRunner --> </testsuite> <!-- com.qa.testrunner.TestRunner -->
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite hostname="NIS1633-FRE.local" name="com.qa.utilities.WireMockTest" tests="1" failures="0" timestamp="19 Jun 2019 19:24:26 GMT" time="0.601" errors="0">
<testcase name="wireMockTest" time="0.601" classname="com.qa.utilities.WireMockTest"/>
</testsuite> <!-- com.qa.utilities.WireMockTest -->
<h2>Groups used for this test run</h2><table border="1"> <h2>Groups used for this test run</h2><table border="1">
<tr> <td align="center"><b>Group name</b></td><td align="center"><b>Methods</b></td></tr><tr><td>cucumber</td><td>AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]<br/></td></tr> <tr> <td align="center"><b>Group name</b></td><td align="center"><b>Methods</b></td></tr><tr><td>cucumber</td><td>AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]<br/></td></tr>
</table> </table>
<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/> <h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
<table border="1"> <table border="1">
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr> <tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
<tr bgcolor="82f6ef"> <td>19/06/17 12:16:48</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]">feature</td> <tr bgcolor="d56d67"> <td>19/06/19 12:38:19</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]">feature</td>
<td>main@1414521932</td> <td></td> </tr> <td>main@1740189450</td> <td></td> </tr>
<tr bgcolor="82f6ef"> <td>19/06/17 12:16:48</td> <td>-214</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;AbstractTestNGCucumberTests.setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]">&gt;&gt;setUpClass</td> <tr bgcolor="d56d67"> <td>19/06/19 12:38:21</td> <td>1936</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]">feature</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1414521932</td> <td></td> </tr> <td>main@1740189450</td> <td></td> </tr>
<tr bgcolor="82f6ef"> <td>19/06/17 12:16:48</td> <td>15</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractTestNGCucumberTests.tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]">&lt;&lt;tearDownClass</td> <tr bgcolor="d56d67"> <td>19/06/19 12:38:19</td> <td>-223</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;AbstractTestNGCucumberTests.setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]">&gt;&gt;setUpClass</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1414521932</td> <td></td> </tr> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1740189450</td> <td></td> </tr>
<tr bgcolor="d56d67"> <td>19/06/19 12:38:22</td> <td>2468</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractTestNGCucumberTests.tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]">&lt;&lt;tearDownClass</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1740189450</td> <td></td> </tr>
</table> </table>
<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/> <h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
<table border="1"> <table border="1">
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr> <tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
<tr bgcolor="82f6ef"> <td>19/06/17 12:16:48</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;AbstractTestNGCucumberTests.setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]">&gt;&gt;setUpClass</td> <tr bgcolor="d56d67"> <td>19/06/19 12:38:19</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&gt;&gt;AbstractTestNGCucumberTests.setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]">&gt;&gt;setUpClass</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1414521932</td> <td></td> </tr> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1740189450</td> <td></td> </tr>
<tr bgcolor="82f6ef"> <td>19/06/17 12:16:48</td> <td>214</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]">feature</td> <tr bgcolor="d56d67"> <td>19/06/19 12:38:19</td> <td>223</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]">feature</td>
<td>main@1414521932</td> <td></td> </tr> <td>main@1740189450</td> <td></td> </tr>
<tr bgcolor="82f6ef"> <td>19/06/17 12:16:48</td> <td>229</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractTestNGCucumberTests.tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]">&lt;&lt;tearDownClass</td> <tr bgcolor="d56d67"> <td>19/06/19 12:38:21</td> <td>2159</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]">feature</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1414521932</td> <td></td> </tr> <td>main@1740189450</td> <td></td> </tr>
<tr bgcolor="d56d67"> <td>19/06/19 12:38:22</td> <td>2691</td> <td>&nbsp;</td><td>&nbsp;</td><td title="&lt;&lt;AbstractTestNGCucumberTests.tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]">&lt;&lt;tearDownClass</td>
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> <td>main@1740189450</td> <td></td> </tr>
</table> </table>
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
<td><a target='mainFrame' href='reporter-output.html'>reporter output</a></td> <td><a target='mainFrame' href='reporter-output.html'>reporter output</a></td>
<td><a target='mainFrame' href='testng.xml.html'>testng.xml</a></td> <td><a target='mainFrame' href='testng.xml.html'>testng.xml</a></td>
</tr></table> </tr></table>
<table width='100%' class='test-passed'> <table width='100%' class='test-failed'>
<tr><td> <tr><td>
<table style='width: 100%'><tr><td valign='top'>Default test (1/0/0)</td><td valign='top' align='right'> <table style='width: 100%'><tr><td valign='top'>Default test (1/1/0)</td><td valign='top' align='right'>
<a href='Default test.html' target='mainFrame'>Results</a> <a href='Default test.html' target='mainFrame'>Results</a>
</td></tr></table> </td></tr></table>
</td></tr><p/> </td></tr><p/>
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
</head><body> </head><body>
<h2><p align='center'>Test results</p></h2> <h2><p align='center'>Test results</p></h2>
<table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr> <table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr>
<tr align='center' class='invocation-passed'><td><em>Total</em></td><td><em>1</em></td><td><em>0</em></td><td><em>0</em></td><td>&nbsp;</td></tr> <tr align='center' class='invocation-failed'><td><em>Total</em></td><td><em>1</em></td><td><em>1</em></td><td><em>0</em></td><td>&nbsp;</td></tr>
<tr align='center' class='invocation-passed'><td><a href='Default suite/index.html'>Default suite</a></td> <tr align='center' class='invocation-failed'><td><a href='Default suite/index.html'>Default suite</a></td>
<td>1</td><td>0</td><td>0</td><td><a href='Default suite/testng.xml.html'>Link</a></td></tr></table></body></html> <td>1</td><td>1</td><td>0</td><td><a href='Default suite/testng.xml.html'>Link</a></td></tr></table></body></html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Failed suite [Default suite]">
<test name="Default test(failed)">
<classes>
<class name="com.qa.testrunner.TestRunner">
<methods>
<include name="setUpClass"/>
<include name="feature" invocation-numbers="1"/>
<include name="tearDownClass"/>
</methods>
</class> <!-- com.qa.testrunner.TestRunner -->
</classes>
</test> <!-- Default test(failed) -->
</suite> <!-- Failed suite [Default suite] -->
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<testng-results skipped="0" failed="0" total="1" passed="1"> <testng-results skipped="0" failed="1" total="2" passed="1">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
<suite name="Default suite" duration-ms="255" started-at="2019-06-17T19:16:48Z" finished-at="2019-06-17T19:16:48Z"> <suite name="Default suite" duration-ms="2704" started-at="2019-06-19T19:38:19Z" finished-at="2019-06-19T19:38:22Z">
<groups> <groups>
<group name="cucumber"> <group name="cucumber">
<method signature="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]" name="feature" class="cucumber.api.testng.AbstractTestNGCucumberTests"/> <method signature="AbstractTestNGCucumberTests.feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]" name="feature" class="cucumber.api.testng.AbstractTestNGCucumberTests"/>
</group> <!-- cucumber --> </group> <!-- cucumber -->
</groups> </groups>
<test name="Default test" duration-ms="255" started-at="2019-06-17T19:16:48Z" finished-at="2019-06-17T19:16:48Z"> <test name="Default test" duration-ms="2704" started-at="2019-06-19T19:38:19Z" finished-at="2019-06-19T19:38:22Z">
<class name="com.qa.testrunner.TestRunner"> <class name="com.qa.testrunner.TestRunner">
<test-method status="PASS" signature="setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]" name="setUpClass" is-config="true" duration-ms="158" started-at="2019-06-17T12:16:48Z" finished-at="2019-06-17T12:16:48Z"> <test-method status="PASS" signature="setUpClass()[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]" name="setUpClass" is-config="true" duration-ms="158" started-at="2019-06-19T12:38:19Z" finished-at="2019-06-19T12:38:19Z">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
</test-method> <!-- setUpClass --> </test-method> <!-- setUpClass -->
<test-method status="PASS" signature="feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]" name="feature" duration-ms="13" started-at="2019-06-17T12:16:48Z" description="Runs Cucumber Feature" data-provider="features" finished-at="2019-06-17T12:16:48Z"> <test-method status="PASS" signature="feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]" name="feature" duration-ms="1935" started-at="2019-06-19T12:38:19Z" description="Runs Cucumber Feature" data-provider="features" finished-at="2019-06-19T12:38:21Z">
<params> <params>
<param index="0"> <param index="0">
<value> <value>
<![CDATA[get the location data by country and zip code]]> <![CDATA[Get driver's details]]>
</value> </value>
</param> </param>
</params> </params>
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
</test-method> <!-- feature --> </test-method> <!-- feature -->
<test-method status="PASS" signature="tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@6eebc39e]" name="tearDownClass" is-config="true" duration-ms="17" started-at="2019-06-17T12:16:48Z" finished-at="2019-06-17T12:16:48Z"> <test-method status="FAIL" signature="feature(cucumber.api.testng.CucumberFeatureWrapper)[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]" name="feature" duration-ms="529" started-at="2019-06-19T12:38:21Z" description="Runs Cucumber Feature" data-provider="features" finished-at="2019-06-19T12:38:22Z">
<params>
<param index="0">
<value>
<![CDATA[To post Employee data]]>
</value>
</param>
</params>
<exception class="cucumber.runtime.CucumberException">
<message>
<![CDATA[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'}}
]]>
</message>
<full-stacktrace>
<![CDATA[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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
]]>
</full-stacktrace>
</exception> <!-- cucumber.runtime.CucumberException -->
<reporter-output>
</reporter-output>
</test-method> <!-- feature -->
<test-method status="PASS" signature="tearDownClass()[pri:0, instance:com.qa.testrunner.TestRunner@5649fd9b]" name="tearDownClass" is-config="true" duration-ms="6" started-at="2019-06-19T12:38:22Z" finished-at="2019-06-19T12:38:22Z">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
</test-method> <!-- tearDownClass --> </test-method> <!-- tearDownClass -->
......
.invocation-failed, .test-failed { background-color: #DD0000; } .invocation-failed, .test-failed {
.invocation-percent, .test-percent { background-color: #006600; } background-color: #DD0000;
.invocation-passed, .test-passed { background-color: #00AA00; } }
.invocation-skipped, .test-skipped { background-color: #CCCC00; }
.main-page { .invocation-percent, .test-percent {
font-size: x-large; background-color: #006600;
}
.invocation-passed, .test-passed {
background-color: #00AA00;
} }
.invocation-skipped, .test-skipped {
background-color: #CCCC00;
}
.main-page {
font-size: x-large;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment