![]() Go to Manage Jenkins > Plugin Manager and search for and install the CORS support for Jenkins plugin.To do so, you should allow CORS to your trusted TestRail domain by following the steps below. This is usually considered a security risk, but with the right precautions you can leverage this mechanism to allow TestRail to access your Jenkins jobs data without an increased risk. To allow the TestRail UI to make direct requests to your Jenkins instance, you need to allow Cross-origin resource sharing (CORS) on the Jenkins end. ![]() The GitHub repository with the Jenkins integration UI script (tested on TestRail v7.5.4) Configuring Jenkins The source code for this example can be found on GitHub: You can see the Integrating with Jenkins documentation for more information and a practical example of how to configure the TestRail CLI to be used in Jenkins. Note that this example only covers triggering and fetching builds from Jenkins if you want your test results to be reported back to TestRail as test runs, you need to configure your Jenkins job to send the results back to TestRail somehow, i.e., using the TestRail CLI. In this example, we add a Jenkins integration to the right side panel of the Test Runs & Results page, so that we have visibility over our latest automated tests jobs results and can trigger them directly from TestRail. In the examples below, we have UI scripts samples you can use, but if you want to learn about how to develop your own custom scripts or further customize these samples, please check the UI scripts documentation page. To add a UI script, go to TestRail’s administration area under Administration > Customizations > Add UI Script and simply copy and paste the whole UI script to the Configuration text box. UI scripts allow you to customize your TestRail GUI with HTML, CSS and JS as a web developer would, meaning you can add almost any UI elements and trigger any action you regularly would when developing a web page. With one line of code in your shell script, you can easily parse the test results and send them to TestRail. ![]() ![]() If your test automation framework supports generating JUnit style reports, we recommend using the TestRail CLI. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |