Push result status on CucumberStudio
Hi folks! Some CucumberStudio users execute the hiptest-publisher command line to push the generated test results file(s) to CucumberStudio test run and it doesn’t work, so no tests are imported in CucumberStudio and the statuses are not updated. In general, the problem is caused by the missing of UIDs in the test results of the file(s). Let’s summarize together the handling! From your test run, click on "Automate" option: In the open modal, you'll see there are 3 suggested command lines. The first one allows the hiptest-publisher installation through Ruby on your machine or CI/CD, the second one is to update your tests and fetch UIDs, and the last one is dedicated to push the test results file(s) after selecting the right report format. Let’s push the test results file(s) to CucumberStudio by following the steps: 1. Update your tests and fetch UIDs, extract only your features without overridden the Actionwords file, via this command line: hiptest-publisher --config-file <path to your config file> --test-run-id <your test run ID> --without=actionwords The UIDs allow our system to match the existing tests in the report file(s) and those in your CucumberStudio test run. 2. Run the tests to generate your report file and automatically transpose the UIDs in your report files. 3. After selecting your report format, execute the last command line to push your test results file, with: hiptest-publisher --config-file <path to your config file> --push <path to your results file> --test-run-id <your test run ID> --push-format cucumber-json Here are some resources about automation in CucumberStudio: Set up your CI/CD tool: https://cucumber.io/tools/cucumberstudio/ci-in-5-minutes-flat/ Documentation: https://support.smartbear.com/cucumberstudio/docs/automation/index.html Hope this helps!1.9KViews1like0CommentsCarry over the scenario attachments in the related test snapshots
Hey! Currently in CucumberStudio the scenario attachments while test run creation. This feature request is on the public roadmap here, but in the meantime you can create a custom script based on your favorite programming language to achieve that. So here are the steps to build the custom script by using these API endpoints: 1. Get scenarios of a given project 2. Store the scenario ids in a variable 3. List attachments of a given scenario 4. Store the attachments ids in a variable 5. Get a given attachment of a given scenario 6. Save the attachments in a new created directory and store their related ids and names ("file-name") in a variable 7. Get tests of a test run 8. Store the test snapshots ids in a variable 9. Fetch and store the last result ids and scenario ids of test snapshots with this API endpoint: GET https://studio.cucumber.io/api/projects/<project_id>/test_runs/<test_run_id>/test_snapshots/<test_snapshot_id>?include=last-result,scenario 10. Match the scenario ids of test snapshots with all scenario ids, and extract those which are included in the test run 11. Create an attachment to a given test execution result Hope this helps!1.4KViews0likes0CommentsDoes CucumberStudio integrates with Serenity-BDD?
The answer is "Yes, it does!" Actually given that feature files could be generated through Serenity-BDD, it integrates with CucumberStudio. At this time, the JSON report format generated viaSerenity-BDD is not supported by CucumberStudio. So you can only push the XML report file(s). To do it, you should override hiptest-publisher templates in order to transpose the UIDs in your .XML test results file(s) without frictions. If for example, you get this output after pushing your test results file: [v] No tests imported Possible causes for the lack of imported tests: * Did you run the following command before executing your tests? hiptest-publisher --config=hiptest-publisher.conf --test-run-id=345241 --without=actionwords * Did you specify the correct push format? Use push_format=<format> in your config file or option --push-format=<format> in the command line Available formats are: cucumber-json, junit, nunit, robot, tap To solve this issue, you should override hiptest-publisher templates by following these steps: 1. Update the hiptest-publisher config file parameters by adding this: overriden_templates = './templates' 2. Then create directories from your project locally to get this path: ./templates/gherkin /my_overridden_template.hbs 3. Copy and paste the content of _scenario.hbs template and integrate it in the right directory like this: ./templates/gherkin/_scenario.hbs 4. Copy and paste the content of dataset.hbs template and integrate it in the right directory like this: ./templates/gherkin/dataset.hbs 5. Change them in order to remove the extra colon after uid. This way will allow the reflection of UIDs in the XML report file(s), for both templates here: _scenario.hbs and dataset.hbs 6. Here is a quick guide for handlebars and CucumberStudio publisher: https://github.com/hiptest/hiptest-publisher/blob/master/docs/handlebars.md Hope this helps 😃1.8KViews1like0CommentsHow to convert manual test cases (Classic) into Automation (BDD format)
Hi Guys, You often ask us about converting manual test cases into Automation. Please see the reply of CucumberStudio Dev lead severine: When you use Classic Agile “Action/Result”, you often use a imperative style. As you are converting your tests using Gherkin syntax, you should refactor your tests using declarative style. You can find more arguments here: http://itsadeliverything.com/declarative-vs-imperative-gherkin-scenarios-for-cucumber. Hiptest enables the capability to refactor your tests with the “promote” feature i.e. by converting steps into an action word (https://hiptest.com/docs/refactor-scenarios/#promote). The idea is to select steps that will give a line in Gherkin style and to create an action word. When you apply the conversion, you can choose the new name of the step in declarative style and you can choose to apply the refactoring at the other places where the selected steps are used. This saves time 🙂. Once conversion is done, selected steps are replaced by the call to the new action word everywhere you had choose. You just need to choose the right keyword Given/When/Then (if you want, it is not mandatory for automation) For example: By using this method, you should be able to refactor your scenarios step by step. By the way, I suggest you to configure step editor preferences of your project as “Automation Ready” (in project settings tab) I hope this helps you. Regards2.5KViews0likes0CommentsHandling Cucumber/JS 3 with Hiptest-publisher
Hi, Currently, Hiptest-publisher does not support out of the bow the notation used by Cucumber/Javascript 3, like what you can see below: var {defineSupportCode} = require('cucumber'); defineSupportCode(function({Before, After, Given, When, Then}) { When('I start the coffee machine using language {string}', function (lang, callback) { this.actionwords.iStartTheCoffeeMachineUsingLanguageLang(lang); callback(); }); }); We are looking for an elegant and scalable way to handle multiple versions of an execution framework with Hiptest-publisher. That said, we have written the different templates that should be used to generate Cucumber/JS 3 compatible code. You can see them in the branch “cucumber-js-3” of the “hps-cucumber-javascript” repository: https://github.com/hiptest/hps-cucumber-javascript/tree/cucumber-js-3 17 To use them, simply copy the “templates” directory of this repository to you own code repository and add the option “overriden_templates=templates” to your Hiptest-publisher configuration file. We’ll keep you updated as soon as we are able to handle different versions of a framework inside hiptest-publisher. Happy testing, Vincent1.4KViews0likes0Comments