Skip to content

Conversation

@sajithveluthattil
Copy link

@neofreko Added changes - To show the devices used for test execution via automation

Copy link
Collaborator

@afathonih afathonih left a 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.

}

String deviceName = System.getProperty("testRail.device");
System.out.println("DEVICE IS"+deviceName);
Copy link
Collaborator

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) {
Copy link
Collaborator

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?

new String(comment.toString().getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8));
body.put("elapsed", elapsed);

body.put("custom_test_device", 999);//comment added
Copy link
Collaborator

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.

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);
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants