Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get JIRA issues in selenium automation

Shashikant Wadikar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2019

Hi Everyone,

 

Currently i want to integrate selenium script with JIRA to raise defects.

 

When my test scenarios get fails then it should raise defect in JIRA.

 

But when creating it by selenium i am getting below error:

net.rcarz.jiraclient.JiraException: Failed to retrieve issue metadata

 

My selenium code:

public static void createNewJiraIssue(Scenario scenario, String projectName, String defectType, String defectSummary,
String defectDescription, String defectReporter, String defectAssignee) {
//Issue newIssue;
System.out.println("in Jira function");
try {
Issue newIssue = jira.createIssue(projectName, defectType).field(Field.SUMMARY, defectSummary)
.field(Field.DESCRIPTION, defectDescription).field(Field.REPORTER, defectReporter)
.field(Field.ASSIGNEE, defectAssignee).execute();
System.out.println("defect raised");
// }
} catch (JiraException ex) {
System.err.println(ex.getMessage());
//System.out.println(newIssue);

if (ex.getCause() != null)
System.err.println(ex.getCause().getMessage());
}
}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events