Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Boozang is a codeless testing tool tool that enables allows you to define and execute UI/API automated tests without the need to code them. It also has support for supports Cucumber tests and has a modular approach towards testing.

Integration with CI/CD tools is also possible through the scripts generated in Boozang to be used in your CI/CD tool.

More details about Boozang here.


Main features

This integration provides:

...

If you are using Xray as the source of truth for your Cucumber tests you will be defining your Cucumber tests, master of information (i.e. defining your Cucumber tests and writing those in Gherkin with Xray), in Xray and then you will import that specification into Boozang to automate the steps and execute them.

Once the execution is done you will import the test results back to Xray, ; so the flow will be the below one:

Gliffy Diagram
macroIdfb3dea3f-fef7-4603-a141-6a9ebd383e3e
displayNamexrayboozangflow
namexrayboozangflow
pagePin1
 


Setup

The first step that you need is to have Start by having your Cucumber Tests defined in Xray, if . If you do not have those defined yet defined please follow this document, you can follow this article in order to add some your Cucumber tests in Xray.

The second step is to define a JQL query, in Jira/Xray, to select those tests in order to import them to Boozang (be imported  into Boozang - the integration is based on this filter), to . To do so select "Search for issues" from the "Filters" entry in the top menu

...

Introduce the query that will allow you to select the Cucumber Tests that you want to export to Boozang (in order to automate those), in my our case it will look like this:

...

Provide a name and save the id that Jira will associate to your filter (. This is especially important as we will use this id in the integration with Boozang to import the Cucumber Tests).


At this stage we have defined the Cucumber Tests in Xray and created a filter to extract those fields, so it is now time to switch to the Boozang application.

Access Boozang (we are using the Europe region but use the one that makes sense for you)  via your region and create a new project where we will create our designated for your test automation, in my case I created the Xray project, next I will . In the example below, an Xray project was created. Next, open the Boozang tool by pressing in selecting the "Launch Tool" option:

Image Modified

This will open the tool (actually unless it's the first time you press this option. If so, it will take you to the installation option of the Boozang AI Chrome extension , and after you have installed it, it will open the tool right away)'ve installed it you'll be taken to the tool.

Image Modified


In order to configure the integration with Xray, we must access the main page and select the configuration option in the bottom left-hand corner and then configure the Feature File Server by pressing clicking on the configuration icon next to it

  Image Modified


This will open a configuration pop up to configure with the different integrations available in Boozang, in our case we are going to choose the "Jira/Xray" option

...

  • Type: Choose Jira/Xray option
  • File List Url: Replace by your Jiran Jira instance URL plus "/rest/raven/1.0/export/test?filter" and the JQL filter that we have saved in Jira/Xray
  • Token: Insert the usernam username and password for your Jira instance
  • Client ID: Leave blank
  • Client Secret: Leave blank
  • Match File: Leave the "*.feature"

You can press select Check to validate that the configuration is okOK, and once everything is done press click on Done.

Now get back to the main page of Boozang application by pressing selecting the first option in the left-hand side menu.

Image Modified


Import Xray Cucumber Tests into Boozang

Now that the configuration is set, we will can export the Cucumber tests from Xray and import them into Boozang, to . To do so use , select the option in the right-hand side menu ( as shown in the screenshot below) , and choose "Import Features" option in the pop up that appearscomes up.

Image Modified


Another pop up will appear asking you to choose the import type, in our case, we will choose "Sync from server" and press select Load.

Image Modified


At this stage Boozang will connect to Xray and list all the requirements that are covered by the Cucumber tests present in the filter you have provided, in my case my . In this case, two Cucumber Tests are covering the XT-45 User Story.


So in the The pop up it will show a preview of what is the requirement from and where it will import the Tests from.

Image Modified


When we press selecting "Start", Boozang will show you the items it will create and proceed with the creation of the features.

Now that we have the features have been imported into Boozang, we need the next step would be to implement the code that will be executed to perform the actual validations, let's get validation. Head back to the main page and check review the Features created.


When I press the Feature it will take me to the clicking on Feature, the actual Tests that where were imported and if I click on will come up, and selecting either of them I will taken to show the detail detailed view of the Tests , where I can see that with the steps that need to be automated (- displayed in red in the screenshot)below.

...


Automating Cucumber Tests in Boozang

I will describe one of the There are several ways to automate the tests and link that automation them to the steps in Boozang however for this section, we will focus on one. For other options more suited to your requirements, we suggest taking a look at Boozang's documentation.

For this example, what matters but you must check the Boozang documentation to see what other ways may be available that are more suited to your needs, what matters for this example is to have the steps automated so that they can be executed and produce a report of the execution to which will be imported to into Xray.

My The approach was is to create new Modules with a test in them that will represent each step in the Cucumber Test in order to be able to link those to each step and reuse them in both Tests.scenario, that way Tests can be reused in other scenarios with the same description.

You can use the recording capability of Boozang to create each Test. The recorder allows you to define the Test steps and the validations For the creation of each Test a used the record capability of Boozang, where I defined the automated steps and the validations that I required for each Test.


Tip
iconfalse
titleTip

In order to reuse some Test steps I , you must assure that when the Test start starts it will not reload the URL but start where the last Test have ended, to . To do that I , set the Parameter inside the "Basic InfoReload Policy" of the detail of the Test to "Never".

Image RemovedImage Added


Once the Modules and Tests are ready we , they'll need to link those be linked to each Step in the Cucumber Test, for that we need to go into . In order to achieve this, access the details of each Cucumber Test and click in the "NOT IMPLEMENTED! -..." steps, that which will load , in the upper part of the application, in under the Main submenu of the "Action Setting" tab.

Clicking Click on the "Goto Test" entry we will have the possibility to choose, from the dropdown list, which Test will be associated to this step .via a dropdown available with a list of tests to choose from:

Image Modified


The final result looks like the following screenshot, where all the steps have automated tests Tests associated and are ready to be executed.

Image Modified


Tip
iconfalse

Once you have associated all steps, you can validate that everything is running as expected by clicking in on the Play button, this . This option will execute the test and report the results back.

When executing the Tests, Boozang will open up a new browser window where you can follow the Test execution and report back to the Test window.

Image ModifiedImage Modified


Import results to Xray

Finally, the Tests we which have been exported from Xray into Boozang are automated and now we need the . The results from the executions to  have to be sent pushed back to Xray, to do that we will use the CI part of the Boozang tool, in this are we will be able into Xray. This can be achieved via Boozang's CI where the ability to generate the necessary scripts , for different CI/CD tools , that will execute the Boozang Test Runner is available.

In Boozang, access the CI entry present in the bottom of the left menu.

Image Modified


Jenkins

In our casethis example, and to take advantage of the Xray Jenkins Plugin available, we generate the script needed to include in Jenkins was generated by clicking the bottom link "Get Jenkins config".

A new pop up will appear requiring details to generate the script.

Image Modified


The majority of the options will be the default ones, we are going to let's choose the "Test case" to be the feature we have automated (in from the drop down list).

Image Modified


Fill in the password, click "Submit" and click on "Generate", this . This will produce the necessary script that we will copy be copied and paste pasted into Jenkins.

Image Modified


In Jenkins, we created a simple Project where we add one step an additional step was added to insert the script generated, more . More specifically by adding a "Execute shell" in the build step section and inserting the generated code there.

Image Modified


Tip
iconfalse
titleTip

If you have defined several Tests the output of the execution will generate one report per Test, so in . In order to upload the results, the results we need to merge those results into one report, this merged into a single report. This can be achieved by using a tool that will merge two Cucumber reports into one.

You can find that tool here, the usage is simple:

Code Block
languagebash
themeDJango
cucumber-json-merge-multiworker report_cucumber-m3-t1.json report_cucumber-m3-t2.json


After the execution, you can find the report in the default output file "merged-test-results.json" or specify the name of the output in the parameter "-o".


The last step, before executing the pipeline, is to add the Xray Plugin to import the results back to Xray. First, to do so make sure you have previously installed the plugin, and  and in your pipeline you , just need to add in the Post Build Actions , the "Xray: Results Import Task" and configure properly with:

  • the Jira/Xray instance that you will use to upload the results
  • the Format of the results file you want to import, in our case Cucumber JSON
  • The path and name of the file to be uploaded


Once you build this pipeline is built, it will execute the tests in Boozang and import the results into Xray as you can verify in the "Console Output" of the build:

...

We can see the response from Xray , where we can find the Test Execution created for this execution.

...

Tip
iconfalse

If you want to see the results in Jenkins, install the Cucumber Reports Plugin that will automatically process and generate a view in Jenkins for you to check go over the results.

Image ModifiedImage Modified


In Xray, if If we verify the Test Execution that was created we can see in Xray, the uploaded results with the total number of Tests and the Overall Execution Status (is available - in this case, it's not really relevant because we only have relevant since there is one Test but if we had they were several Tests it will be the overall result of all the Tests).


To have a better understanding of the details of the execution we can press the details button (one Click on the Details button (below the red arrow) that will take us will give users a better understanding of the characteristics of the execution since it navigates to the execution panel of the Test Execution , in there we can see the details of the executionwith the following information:

  • The requirement that is covered by the Test, in this case, XT-45
  • The scenario definition
  • The details of the execution of each step

...

If Jenkins (or another CI/CD tool) is not part of your workflow you can use the Xray API to send import the result back to into Xray through the command line, to . To do so you must take two , please follow the next steps:

  • Authenticate to obtain the token
  • Send the results to Xray ( using the token obtained)token 


Authenticate 

The authentication int he Server/DC version is done using the username and password in every request, so no special step to perform before executing the import request.

...

Finally to upload the results back into Xray you must use the following request:

Code Block
languagebash
themeDJango
curl -H "Content-Type: application/json" -X POST -u admin:admin --data @‘xrayResults.json’ ‘https://xray-demo3.xpand-it.com/api/v2/import/execution'

When successful, the answer will have information of the Test Execution created.


In Xray we We can see the detailed results in Xray:

Learn more