-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changes for test rail reporting #7
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we extract that custom_test_device
string, we are good with this PR.
@@ -74,6 +76,16 @@ public static TestRailArgs getNewTestRailListenerArgs() { | |||
} | |||
} | |||
|
|||
String deviceName = System.getProperty("testRail.device"); | |||
System.out.println("DEVICE IS"+deviceName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add colon, space and makes it sentence case to look nice.
if (deviceName != null) { | ||
try { | ||
args.primaryDevice = deviceName; | ||
} catch(NumberFormatException ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this try-catch? Is it converting it to number?
|
||
// add the result | ||
Map<String, Object> body = new HashMap<String, Object>(); | ||
body.put("status_id", getStatus(resultStatus)); | ||
body.put("comment", | ||
new String(comment.toString().getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8)); | ||
body.put("elapsed", elapsed); | ||
|
||
body.put("custom_test_device", 999);//comment added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is hard-coded field name, let's move it as constant where it's easy to find. Or makes it as another argument with default value.
@@ -268,6 +270,7 @@ public void reportResult(List<Map<String, Object>> properties) { | |||
body.put("comment", new String(comment.toString().getBytes(StandardCharsets.ISO_8859_1), | |||
StandardCharsets.UTF_8)); | |||
body.put("elapsed", elapsed); | |||
body.put("custom_test_device",999); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above:
Since this is hard-coded field name, let's move it as constant where it's easy to find. Or makes it as another argument with default value.
@neofreko Added changes - To show the devices used for test execution via automation