-
Notifications
You must be signed in to change notification settings - Fork 13
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
Bellatrix Jira Zephyr Plugin #37
Conversation
Added TestDurationWatcher and TimeRecord for tests
@@ -36,15 +36,32 @@ public void preBeforeTest(TestResult testResult, Method memberInfo) throws Excep | |||
public void postBeforeTest(TestResult testResult, Method memberInfo) { | |||
} | |||
|
|||
|
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.
remove line
@@ -13,6 +13,8 @@ | |||
|
|||
package solutions.bellatrix.core.plugins; | |||
|
|||
import org.apache.http.annotation.Obsolete; | |||
|
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.
remove line
@@ -68,27 +70,52 @@ public static void postBeforeTest(TestResult result, Method memberInfo) { | |||
} | |||
} | |||
|
|||
|
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.
extra line here as well
} | ||
|
||
private String getProjectId(Method memberInfo) { | ||
if (memberInfo.getDeclaringClass().isAnnotationPresent(ZephyrProject.class)) { |
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.
do we support the attribute only on the class level?
try { | ||
return settings().getDefaultProjectKey(); | ||
} catch (Exception ex) { | ||
return ""; |
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 error log - Zephyr Project Id annotation not found on class level
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.
actually it is reading it from the config
|
||
var testCycleName = String.format("%s %s", | ||
DateTimeUtilities.getUtcNow(), | ||
settings().getTestCycleName().isBlank() ? settings().getTestCycleName() : "BELLATRIX RUN"); |
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.
this is fine for now, but potentially we would want to set this via Environment variable.
DateTimeUtilities.getUtcNow(), | ||
settings().getTestCycleName().isBlank() ? settings().getTestCycleName() : "BELLATRIX RUN"); | ||
|
||
var testCycle = new ZephyrTestCycle(settings().getDefaultProjectKey(), testCycleName, "In Progress"); |
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.
maybe extract the statuses to enum?
public static final EventListener<ZephyrExecutionPluginEventArgs> ZEPHYR_TEST_CASE_EXECUTED = new EventListener<>(); | ||
public static final EventListener<ZephyrCyclePluginEventArgs> ZEPHYR_CYCLE_STATUS_UPDATE_FAILED = new EventListener<>(); | ||
|
||
private ZephyrLocalData data; |
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.
this is a bit generic - I would rename it to zaphyrData
} | ||
} | ||
|
||
@Getter @Setter |
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.
a class in the class? We usually create them in separate files
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.
Please review and fix the PR comments.
# Conflicts: # bellatrix.core/src/main/java/solutions/bellatrix/core/plugins/PluginExecutionEngine.java # bellatrix.core/src/main/java/solutions/bellatrix/core/plugins/junit/BaseTest.java
No description provided.