How can we integrate continuous automation testing into our test strategy?
The most common way to do this is through use of a continuous integration tool. Things like Jenkins, Azure, and Buddy. These can all be used with Eggplant DAI. What I'm going to show you now is how we can run DAI tests remotely using a DAI runner executable and have the results of the test posted to an external test organization tool. JIRA is a widely used project management platform, particularly for agile and software development projects.
We can use JIRA to start our DAI tests keeping your project management and test management in line. And I'll demonstrate that to you now. When it comes to pushing the results to our test management tool Xray. I'll be using the DAI service. This is a command line tool that pulls an instance of DAI for a test run that matches a group to be specified. When a run comes in that is part of that specified DAI group. The run is tracked and the results are posted to the relevant test in Xray.
For this, you have to enter some parameters in the same manner with the DAI runner, except this time you also have to add your Xray information to allow authentication and posting of results. Details of this are outlined in the documentation for the DAI service. So now you can see my DAI service is started, it's running, and just waiting for test execution to come in from DAI. If I go over and trigger my deploy Jenkins job first.
This is the one that simulates the building of my code. And once that's complete, you'll see the DAI test pipeline get triggered off shortly afterward. Once that starts, we can go down and look at the console information for this pipeline to observe some further logging information. We can see now that the test case has been triggered and we get some information such as the ID of the test run, the model that is being run, and the test case that's being run.
If we also observe this in the DAI service terminal, we see this gets picked up there as well. And then once the run is complete, we can see whether the test has passed or failed. And this will be reflected both in the outcome of the pipeline and also in the DAI service, and which results get posted to Xray.
So if I head over to the results page of DAI now and just refresh the page, we'll see a new test run come in for the test runner we just did. Also, if I go to Xray and look at the test runs for that test, we'll see a new test execution come in as well. Here we can see this test run came in only 24 seconds ago. And we've also got a handy link to go on view in DAI too.
We've seen we're able to trigger the DAI test remotely as soon as our code is built and have the relevant results posted to an external test management tool. Another way to implement continuous automation is to make use of the JIRA automation feature. As a lot of corporations use JIRA for their project and test management with plugins like Xray and Zephyr Scale, it makes sense to be able to trigger your tests here also. Jira automation is found at the project level and allows you to create specific rules to better assist your project management. It's an extremely versatile feature of Jira that allows you to use a wide range of triggers, and also add a number of conditions to best fit your requirements. In this case, we're using an issue transition trigger when an issue is moved from in review to done, and a condition whereby the issue type is a new feature.
Once that trigger and condition are met, we will then trigger our DAI tests. And for this, we've used the send web request action. As part of that action, we are passing in a number of different parameters into the custom data section and conducting a Post request directly to the Eggplant DAI run endpoint. We also pass in a bearer token and content type as headers.
The details in the custom data section are mainly just data that are required by the API. Things such as the model and test case, as well as the AI agent and suite. We can also validate our request when we create it as well. If I head over to this feature story that I have in JIRA, it currently has the status of an interview.
If I change the status to done, we'll see that my DAI test also gets triggered off as well. We'll just look into this automation section here. And we can see a few seconds ago my DAI tests got triggered. We can then go to DAI and just refresh the results page and we'll see a new test run has come in and is in progress. And while we wait for that to complete. And just refresh the page again.
We'll see that the test has come in at 4:45, the time we triggered it off and it has passed.
Today, we went over what continuous test automation means and a few different ways to implement the methodology using Eggplant and various other tools like Jenkins and Jira. We do have these scenarios and the variations of them documented, which we'll send out links to. I hope this session was useful and I look forward to hearing your feedback. Thank you.
Comments are closed.