Push result status on CucumberStudio
Hi folks! Some CucumberStudiousers executethehiptest-publishercommand linetopush the generated testresults file(s) toCucumberStudiotest run and itdoesn’twork,sono tests are imported inCucumberStudioandthe 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 thehandling! Fromyour test run,clickon "Automate" option: In the openmodal, you'll see thereare 3suggested command lines. The first oneallowsthehiptest-publisherinstallationthrough Ruby on your machine or CI/CD, the second one is to update your tests and fetch UIDs, and the last oneis dedicated to pushthetest results file(s)after selecting the right report format. Let’s push the test results file(s) toCucumberStudioby following the steps: 1. Update your tests and fetch UIDs,extractonly your featureswithoutoverriddentheActionwordsfile,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 inthereport file(s)and those in yourCucumberStudiotest run. 2. Runthetests to generate your report file andautomaticallytranspose the UIDs in yourreport files. 3. After selecting your report format, execute thelastcommandline 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 aboutautomationinCucumberStudio: 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 meantimeyou 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!" Actuallygiven that feature filescould begeneratedthroughSerenity-BDD, it integrates withCucumberStudio. At this time, the JSON report format generatedviaSerenity-BDDis not supported byCucumberStudio.Soyou can only push the XML report file(s). To do it,you should overridehiptest-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 overridehiptest-publishertemplatesby following these steps: 1. Updatethehiptest-publisherconfig 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.hbstemplateand integrate it in the right directory like this: ./templates/gherkin/_scenario.hbs 4.Copy and paste the content ofdataset.hbstemplateand integrate it in the right directory like this: ./templates/gherkin/dataset.hbs 5. Change them in order toremove the extra colon afteruid. This way will allowthe reflection of UIDs in the XML report file(s), for both templates here:_scenario.hbsanddataset.hbs 6. Hereis aquickguide for handlebars andCucumberStudiopublisher: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 leadseverine: 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