Usha Keshavamurthy | 27 May 12:14 2016
Picon

[Cucumber] Re: [Cucumber:826] Re: [Runner] Is it possible to terminate early on failure?


Hi Ben,


I had a similar requirement for failing subsequent scenarios on first failure and bumped onto this post. Do we have this option now? 

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
ziffification | 26 May 22:21 2016
Picon

[Cucumber] new rake and cucumber integration problems

I am having probelms configuring Rake in Jenkins top run a cucumber test i have. I cannot figure ouut what i should be filling in tasks is that just a name that you give to the job or is it something from the .Rakefile? 








here is my .Rakefile 




require 'cucumber/rake/task'

Cucumber::Rake::Task.new :features do |t|
 t.cucumber_opts = '--format json features/testEBI.feature > /var/lib/jenkins/workspace/SASEBI\ test/report.json'
end


any suggestions?

 

 


--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Sudhansu Sekhar panda | 25 May 16:16 2016
Picon

[Cucumber] How to add build version in serenity reports in Cucumber?

Hi All,

Currently I am using serenity for my cucumber reports, I am unable to add the Version value to that serenity report so that its blank. Can anybody help me how to add the Version value either from feature file or any other way so that I can see the version in the serenity reports section?

With Best Regards,

Sudhansu

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Tom Eugelink | 25 May 11:50 2016
Picon

[Cucumber] [JVM] Nested groups

I would like to have an optional part in the steps expression that actually contains a parameter, so something like:
^I enter '([^']?)' (|after having filtered on '([^']?)')$

Basically what is needed are nested groups, because the first level makes the last part optional, and the group inside that captures the parameter.

Is this possible?

Tom

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
CS Wong | 25 May 02:25 2016
Picon
Gravatar

[Cucumber] How to organize a common set of scenarios for execution in different apps / test suites

Hi,

Say I have a project with business scenarios that span 3 different apps:

  1. Transactions come into Internet Banking front end which handles the login, front-end validation etc;
  2. The real debit / credit transactions will get forwarded from IB to the ESB layer which receives a REST request and transforms it into a legacy ISO8583 request over TCP;
  3. The ESB then forwards the ISO8583 request to the core banking backend to execute the transaction

I have 3 apps in my scope, each of them owned by different app owners.

So, one of my scenarios may look like this:

Given that I have $200 in my savings account
When I execute a bill payment transaction for $20
Then my remaining balance should be $180

During the development stage, each app owner would be working independently. Integration points between the apps would be substituted with stubs and mocks. I still want them to do internal functional testing using the Gherkin scenario above though. So each of them would implement the test differently, e.g.:

  1. IB app owner would run a Cucumber test that triggers Selenium WebDriver to interface with his own IB app, but the part where IB talks to ESB would be substituted by a service stub.
  2. ESB app owner would use Cucumber to trigger SOAPUI to fire REST requests into itself and output to the backend is also stubbed.
  3. Mainframe core banking owner would use Cucumber to trigger a custom TCP formatter to fire requests into itself.
All 3 apps should implement the same business scenarios so that we are all working towards a common goal.

Finally, when we do E2E integration testing, we remove the stubs, link up the apps and run a common test suite to fire requests via WebDriver into IB which will flow through all the way to core banking.

Given that there are 4 test implementation suites in total for 3 different apps, what is the recommended way to organize the feature spec files vis-a-vis the implementations? Committing the same feature files into 3 different source code trees seems like unnecessary burden to me. Is it possible for me to maintain 4 different test implementation suites referring to a common feature specs set in the same source tree?

Would welcome your views on how to best approach this.

Thanks
Wong

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
jason.smiley | 23 May 23:09 2016

[Cucumber] [Question] Want to build a "run failed test" command into my HTML/Cucumber-jvm report

Hi All, 

Background:
I have been asked, as nice to have, to create a link in the HTML/JSON report which will allow a consumer of my test report to rerun the specific failing scenario. I will do this using Jenkins, however, I am not sure how I can get the required information to build the command.

Question:
Given I have access to the Scenario object, is there a way to use the getScenarioId() command and build a mvn command using it? 

I thought the scenario id would give me the feature file path and line number but it does not. Instead, it gives me the "<feature-file-name-with-dashes-no-spaces>:<scenario-name-no-spaces>"

Is there a way to use this value and pass it in?

For example:
mvn clean command -Dcucumber.options="-id <scenarioId>" //nothing like this at the moment

Its not clear in the documentation if this is possible or not. Please advise!

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Justin Radcliffe | 23 May 16:29 2016
Picon

[Cucumber] Step Definitions in Eclipse

Has anyone found a good way to create step definition class in Eclipse from a feature file like from Intellij?

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
ziffification | 20 May 19:16 2016
Picon

[Cucumber] convert should to expect deprecation






I have a feature file :



Feature: Validate DUT EBI
    EBI should be evaluated
for all reports
   
All reports routes should return valid HTML
   
If HTML is invalid for one or more report it has DUT failed


Scenario Outline: Validate JSON
   
Given there is a DUT with "<host>" and "<url>" and "<un>" and "<pw>"
   
When the EBITest code is run
   
Then the output should be "<output>"




 
Examples:
   
|host             |url   |un    |pw           |output|    
   
|bidev01|bidev01|rwm132|welcome2start|CHECK|
   
|bitest01|uviewtest|rwm132|welcome2start|CHECK|





and a step definition file 

Given(/^there is a DUT with "(.*?)" and "(.*?)" and "(.*?)" and "(.*?)"$/) do |host,url,un,pw|


 
<at> un = un
 
<at> pw = pw
 
<at> host = host
 
<at> url = url


end


When /^the EBITest code is run$/ do
 
<at> output = `./testEBI.rb #{ <at> un} #{ <at> pw} #{ <at> host} #{ <at> url}`
 
raise('Command failed!') unless $?.success?
end


Then /^the output should be "([^"]*)"$/ do |expected_output|
  <at> output.should == expected_output
end








how do I avoid that deprication message about should 

DEPRECATION: Using `should` from rspec-expectations' old `:should`




do I just need to change 


<at> output.should == expected_output

<at> output.expected == expected_output




--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Tom Barber | 19 May 20:37 2016
Picon
Gravatar

[Cucumber] [JVM] Display Background once on output report

Is it possible to somehow configure cucumber so that the "Background" is only displayed once in the output report rather than reprinted before each scenario? I'm using the cucumber reporting plugin but as that feeds on the json output I presume that if I can fix it there the html report will follow suit. Thanks!

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Tom Eugelink | 18 May 13:20 2016
Picon

[Cucumber] Using cucumber as a DSL for business rules?

Some years ago I have written a price logic using mini expressions and then creating javascript in Java to evaluate. For example in a column "amount" one could type ">100" and in the price column "10", meaning that if you sell more than 100 units, the unit price would become 10 dollars. I would generate javascript in the form of "if (amount > 100) return 10" en execute that dynamically. Works fine and the flexibility is very appreciated by the users.

Now I need to do something similar and am considering using Gherkin:
    When amount > 100
    Then unit price is 10 USD

So not asserting business rules, but actually writing them in Gherkin. Has anyone tried this before?

What is the appropriate class to use in Cucumber-JVM to manually run such features?

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Mohan | 17 May 13:17 2016
Picon

[Cucumber] [JVM] How to use Spring <at> Autowire, <at> Value in cucumber groovy step files

Problem:

I have earlier created automation test framework with cucumber-jvm(java) and Spring


I now  want to convert into cucumber groovy , convert all code into groovy  and use Spring with annotation like <at> Autowired,   <at> Value


Earlier my all Cucumber Steps classes(java) used to extend BaseStep which has Spring components like mentioned below

Sample Base Step class


<at> ContextConfiguration(locations = {"classpath:cucumber.xml"})

public abstract class BaseStep {


    <at> Autowired

    protected ScenarioSession scenarioSession;


    public static final String TIME_STAMP = new SimpleDateFormat("yyyyMMddHHmmsss").format(new Date());


    public static final String VERSION = "999";


    public static  final int TIN_IN_SECS = 10;


    // Environment name like QA, Stage, Dev etc

    <at> Value("${env.name}")

    public String env;


    public ScenarioSession getScenario() {

        return scenarioSession;

    }




}

1. Above ScenarioSession is singleton object shared across various steps to share data  between steps and also share state of webdriver/selenium state


2. <at> Value use to retrieve test environment name from property file


3 Environment related configuration parameter like baseUrl,  userName and password read from property file e.g Dev.properties,  Stage.properties, Prod.properties.

 environment is specified from command line .eg mvn clean test -DEnv=Dev


4.  Cucumber.xml has following


<context:component-scan base-package="com.company.prooject.protests"/>


<context:property-placeholder location="classpath:env/${Env}.properties"/>


<context:annotation-config />



<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">

    <property name="scopes">

        <map>

            <entry key="cucumber-glue">

                <bean class="cucumber.runtime.java.spring.GlueCodeScope"/>

            </entry>

        </map>

    </property>

</bean>



Question:



1. As Cucumber groovy Step is DSL script without class. It can not extend equivalent Base Common Step Class, How to share singleton common ScenarioSession Object with various groovy Step file


2. How to inject various configuration parameter with the help of Spring <at> Value in Step class?  When  I added <at> Autowired or <at> Value in Step class. It says "not applicable to local variable"


3. How to inject various property read from properties file into step  file with help of Spring



Thanks 

Mohan

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Gmane