Protracter + Cucumber + TestRail integration - protractor

What is the best way to integrate Protracter + Cucumber + TestRail. I tried to find the documentation however it was not able to find any good solution.

Seems TestRail organize one test case with 3 parts: precondition, test steps and expect results. It not store the Cucumber Feature file directly. But for Cucumber, it rely on feature file as all things start.
I think you need to find out a way to generate Cucumber Feature file according to meta data in TestRail.
There is a Nodejs package: Node-TestRail which can call TestRail api to obtain test case meta data, you need to implement an convertor to convert meta data to Cucumber Feature file and save Feature file into a folder in your Protractor + Cucumber project (this project should includes step definitions etc)
Now you can execute Protrator script.

Related

How to make a systematic report in protractor

I am working on protractor for testing an angularjs application. I am also able to fetch the report but I want to mention some more points and details about the test execution. For example Its model name, Test case name, Severity, Priority, Where the test failed if it gets fails etc. Where should I add all this points so that I can be able to fetch a complete detailed report.Currently I am able to get the report I have attached here.
Please help me in getting the solution as I am new to protractor. Thanks a lot in advance.
Jasmine framework does specs reporting, not Protractor in e2e testing. You can either leverage some of the popular ones listed below or need to create your own using custom reporter.
https://www.npmjs.com/package/jasmine-spec-reporter
https://www.npmjs.com/package/protractor-html-reporter
https://www.npmjs.com/package/protractor-beautiful-reporter
http://jasmine.github.io/2.1/custom_reporter.html
Or you can try with allure plugin here http://allure.qatools.ru/
I also advice to use allure report. It is easy to setup and has a good documentation. Just want to mention that there is Allure 2 is ready. Take a look at Git Hub and integration for JS

Protractor: create test case scenarios out of spec file

Currently all test cases in Protractor I must copy/paste into a document (JIRA, ...), for example what I click, enter or interact with and also the assertions. As you can see this is time consuming and I'm wondering if there is there a way to create test scenarios out from Protractor test cases with plugin or something like that?

ChaplinJS + Brunch, can I produce only one JS file?

I would like to optimize the loading time of my website which is built on Chaplin + brunch (coffeescript).
How could I pack everything so that only one js file would be seen / loaded by the browser ?
It is mainly a workflow question, I don't know if this can be achieved by brunch itself or if I should rely on an external package such as webpack or even jspm.
That does it: config.files.javascripts.joinTo = 'app.js'
http://brunch.io/docs/config#-files-

Using allure with JBehave and Lettuce

We have 2 fairly large automation projects going, both using BDD. One is in Lettuce for a desktop app, the other is for a website using JBehave (we are just getting started with the web project).
We have tried using Thucydides for reporting for our JBehave project, and started implementing tests using that. However, we ran into Allure and it looks a lot better and lets us use standard JBehave framework without relying on someone's code that has its own unknown-to-us issues. Luckily, we found Allure early enough.
2 questions:
1) We spent 2 days trying to make Allure work with JBehave, but the only example on GitHub isn't working well (all scenarios are reported together without breakdown by individual stories or scenarios). Also, JBehave doesn't have an #AfterStep decorator and it's a requirement for us to save screenshots after each step, successful or not. Thucydides for all its faults took care of that. Does Allure have something similar? If not, then at least is there a working example of how to make it report stories and scenarios correctly when run from JBehave?
2) I haven't tried yet, but doesn't look like there is an adapter for Lettuce (Python). Can someone recommend a way to produce Allure reports from Lettuce?
Thanks a lot!!
Allure doesn't support JBehave and Lettuce yet. But you can implement such adapters by yourself.
First step you need to read the following section https://github.com/allure-framework/allure-core/wiki#development in documentation. Then if you are ready to contribute you should follow the following instructions:
JBehave
We already have Java adaptor. So all you need is add allure-java-adaptor-api module as dependency and then implement JBehave listener.
Lettuce
There are the same. You can use allure-python bindings and all you need is implement Lettuce handlers. Python team are going to move bindings (aka allure-python-adaptor-api) to separate module, you can force it by comment in https://github.com/allure-framework/allure-python/issues/63
So, if you have any questions/suggestions you can also use our gitter chat room (https://gitter.im/allure-framework/allure-core) or our mailing list (allure#yandex-team.ru)
Hope it helps.
To achieve integration between JBehave and Allure you can create your own implementation of org.jbehave.core.reporters.StoryReporter. From the methods in this interface you can fire the Allure events that correspondent to the JBehave abstractions. In our implementation we fire TestSuite*Events from e.g. StoryReporter#beforeStory() and TestCase*Events from e.g.StoryReporter#afterScenario().
The caveat is that for some JBehave events you have to fire multiple Allure events. For example for a failed jbehave step we fire the following allure events:
public class AllureStoryReporter implements StoryReporter {
...
#Override
public void notPerformed(final String step) {
getLifecycle().fire(new StepStartedEvent(step).withTitle(step));
getLifecycle().fire(new StepCanceledEvent());
getLifecycle().fire(new StepFinishedEvent());
}
}
Of course the created reporter needs to be registered to be used during reporting by JBehave.
This results in comprehensive Allure reports.
At least for JBehave, the support was added since then

Data Driven Framework - Selenium Webdriver

I am automating a web application testing using Selenium Webdriver(Java with JUnit) and I am quite familiar with Data Driven Testing. Now I want to build a Data Driven framework and I don't have any resources to start with.
Does anybody have idea how I could start with building framework and what are all the initial setup I need to make.?
Any suggestions would be appreciated. !!
Get start google with TestNG or JUnit then PageFactory and PageObject
You need to create Excel utility for Read and Write data in Excel sheet, Going forward you can manage it through Selenium.
Reference Link:
https://www.guru99.com/data-driven-testing.html
https://www.softwaretestinghelp.com/data-driven-framework-selenium-apache-poi/
http://toolsqa.com/selenium-webdriver/data-driven-testing-excel-poi/