When you're first learning to code, one of the first questions your experienced programmer friends will ask you is - are you posting your stuff on GitHub? That was the case 10 years ago, it still is now. GitHub has got everything: code repositories, issue tracking, CI/CD. In fact, it is currently the most popular CI system around. And of course, Allure Testops has an integration for GitHub.
Testops leverages Github's functionality to provide you with a single interface from which you can control your entire testing flow. This means integrating with GitHub
- as an issue tracker and
- as a CI/CD system.
Time to take a look at both parts.
Creating issues
We've recently added new functionality that allows linking issues and defects. First things first, we need to have Issues enabled in the settings of your GitHub repo:
Now, we've got to create our defect in Testops:
Once we've clicked the "New defect" button, we fill in the name and the description of the new defect and then click "Create issue":
Several fields will pop up that you'll need to fill with info on your issue:
Bam, you've got a new defect with a link to a GitHub issue! And if you follow the link, you'll see that the issue, in turn, has a link to the Testops defect.
Soon, you'll be able to do more stuff with issues. We're working on making it possible to link issues to test cases, not just defects. The basic stuff is there; we've just got to sort out a few bugs.
CI server
Our integration with GitHub as a CI server can do everything our other CI integrations can - which is quite a bit. You can select what tests you want to run, launch a test run from the Testops side, monitor the execution live, review the results, and, if needed, re-run failed tests with a few clicks of the mouse.
There's an in-depth guide in our documentation on how to set up the GitHub integration. I won't go into all the details here: the guide is well-written and exhaustive. What's important is we've done our utmost to make the task as easy as the circumstances allow. Here are the main things you'll need to do:
- Tell GitHub about Testops: create an API token in your profile in Testops, and then add it to secrets in GitHub, along with some other info:
Set up a GitHub workflow that will trigger allurectl when needed.
Tell Testops about GitHub: set up the necessary variables in Project > Settings > Environment, create a token in GitHub, then enable the integration in Testops with that token, both in general settings and in project-level settings. The process of adding a new integration has been standardized and streamlined as much as possible. We've got a slick, unified interface for all integrations:
- Finally, create a Testops job - the entity that links your Testops project with the GitHub pipeline. And you do it by just executing your GitHub workflow. If you've done all the previous steps, a job will be created automatically. Then, you'll need to fiddle with its settings a little, and the process is done.
Conclusion
Allure Testops and GitHub are a perfect pair. GitHub allows you to store your code and your tests, execute everything, and track your work tasks - all in one system. Allure Testops uses that power to control your entire testing flow from one place.