How to integrate JIRA with Selenium WebDriver?

后端 未结 3 837
情深已故
情深已故 2021-02-04 19:49

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.

3条回答
  •  囚心锁ツ
    2021-02-04 20:26

    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.

提交回复
热议问题