Skip to content
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

Merged
merged 6 commits into from
Jul 9, 2024
Merged

Conversation

MiriamKyoseva
Copy link
Collaborator

No description provided.

@@ -36,15 +36,32 @@ public void preBeforeTest(TestResult testResult, Method memberInfo) throws Excep
public void postBeforeTest(TestResult testResult, Method memberInfo) {
}


Copy link
Collaborator

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;

Copy link
Collaborator

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) {
}
}


Copy link
Collaborator

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

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

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

Copy link
Collaborator

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

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

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

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

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

n1xan
n1xan previously requested changes Jun 5, 2024
Copy link
Collaborator

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

@MiriamKyoseva MiriamKyoseva requested a review from n1xan June 7, 2024 20:42
# Conflicts:
#	bellatrix.core/src/main/java/solutions/bellatrix/core/plugins/PluginExecutionEngine.java
#	bellatrix.core/src/main/java/solutions/bellatrix/core/plugins/junit/BaseTest.java
@MiriamKyoseva MiriamKyoseva dismissed n1xan’s stale review July 9, 2024 07:00

changes were made

@MiriamKyoseva MiriamKyoseva merged commit 71ed8d8 into main Jul 9, 2024
1 check passed
@MiriamKyoseva MiriamKyoseva deleted the bellatrix-jira-zephyr-plugin branch July 9, 2024 08:18
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.

3 participants