allankp / pytest-testrail

pytest plugin for integration with TestRail, for creating testruns and updating results
MIT License
96 stars 124 forks source link

Not able to export Background step from feature file to testrail #159

Open kunalbehl12 opened 2 years ago

kunalbehl12 commented 2 years ago

Describe the bug I am using BDD Cucumber pytest framework. I have been exporting test cases and results into testrail using pytest commands.

python -m pytest -v --pytest-testrail-export-test-results --pytest-testrail-test-plan-id [planID]--pytest-testrail-test-configuration-name "Windows 10 Chrome" --driver Chrome --driver-path=./binaries/webdriver/chromedriver --tags ""

However, I do not see Background step gets added in the precondition field of test cases in the testrail. I am also not getting any error. Test case gets added without background. Could you please suggest if anything is missing.

To Reproduce Steps to reproduce the behavior: Background: Given The browser resolution is '1367' per '768' -------> This is not added by using above command. It shows blank

@TR-C164442 @Kunal Scenario Outline: Navigate to test site Given I am on the url 'https://google.com/' Then I expect that the title contains </p> <p>Examples: | title | | Google |</p> <p>Command - python -m pytest -v --pytest-testrail-export-test-results --pytest-testrail-test-plan-id [planID]--pytest-testrail-test-configuration-name "Windows 10 Chrome" --driver Chrome --driver-path=./binaries/webdriver/chromedriver --tags "Kunal"</p> <p><strong>Expected behavior</strong> Background step should get added (in precondition section) like other scenario steps</p> <p><strong>Screenshots</strong> Precondtion remains blank.</p> <p><strong>Desktop (please complete the following information):</strong></p> <ul> <li>OS: Windows 10</li> <li>Browser Google Chrome</li> <li>Version 101.0.4951.67</li> </ul> <p><strong>Additional context</strong> We are using customized pytest testrail client library. </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/kunalbehl12"><img src="https://avatars.githubusercontent.com/u/93395588?v=4" />kunalbehl12</a> commented <strong> 2 years ago</strong> </div> <div class="markdown-body"> <p>Any update on this?</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>