How can I can integrate JIRA with Selenium WebDriver? Actually I want to execute test cases and report pass/ fail status for each test cases in JIRA.
Atlassian offers Jira REST APIs that allow you to easily integrate with Jira Cloud, Server, and Data Center. In addition to integrating with our REST APIs, Jira also provides you with a framework that allows you to customize Jira's UI with an app.
Reviewers felt that Jira meets the needs of their business better than Selenium IDE. When comparing quality of ongoing product support, reviewers felt that Jira is the preferred option. For feature updates and roadmaps, our reviewers preferred the direction of Jira over Selenium IDE.
Automation allows the testing process to support QA testers in managing automated project design, planning, development, monitoring, and revision testing on the original Jira project tracking platform. Testers and analysts can create, schedule and execute tests directly inside a Jira project.
Your question is very general, so my answer will follow suit.
Jira isn't exactly a TCM (Test Case Manager) application, though it's certainly possible to track tests using Jira... The point being, you'd likely be looking at a fair amount of custom code work trying to get test launch/scheduling capabilities integrated. You'd be far better off using something like Jenkins or Team City for your kick off.
To get results back into Jira, you'd need two things. First up is a test framework. TestNG is a great match for Selenium, as is JUnit, assuming you're using the Java language binding. Regardless of language, however, you will need a test framework alongside Selenium. I'm unsure of any library off the top of my head that integrates a test framework into Jira, so there may be some custom code involved to capture the result of an automated test and relay those results into Jira, which is the second needed item. As @Helping Hands mentioned, their REST API is likely a good place to start. There may be a listener out there for TestNG that may do this, but a cursory google search didn't return any readily valuable information.
If I may opine a bit, I wonder if Jira is really the best tool for the job here. I realize you may have constraints that restrict your options here, but I think integrating into Jira may be bit of wheel re-invention. Tools like qTest or TestRail are purpose built for QA activities, integrate with Jira on their own, and provide support for automation results reporting out of the box. I'm not saying what you want to do is a bad idea, just that there may be other options that may not require as much overhead to producing value.
I hope this helps. If you can provide some more detail about your goals, I'd be happy to add more specific input.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With