Jonathan Aubuchon | 30 Jun 17:26 2015
Picon

[Cucumber] log java exceptions to log4j

Hi,

I'm trying to log the exceptions that are occuring during the execution of a test suite. Note that I also want the exceptions that are occurring during the <at> Before and <at> After hook.

From what I understand, cucumber print to the console those exceptions, but is there a way to log them into log4j?

PS: I don't want to place try{ ... } catch { logger.error(...) } in every steps.

Thank you

--
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.
tim.haussmann | 28 Jun 17:51 2015
Picon

[Cucumber] [cucumber-jvm][Android][Gradle] Tests fail because startActivitySync() blocks

Hallo,

I'm trying to get cucumber-jvm running on Android. The Android gradle example is running fine, but I've some problems with tests in my own project.
I have implemented multiple test scenarios without cucumber-jvm first. Those tests run fine. Now I'm converting them to cucumber-jvm.

The first scenario runs fine, all following scenarios are started and then they block in startActivtySync() until they are aborted:

        java.lang.RuntimeException: Could not launch intent Intent { flg=0x14000000 cmp=xx.xxxxx.app/.misc.MasterActivity } within 45 seconds. Perhaps the main thread has not gone idle within a reasonable amount of time? There could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was idle before your activity launch request was 1435366760013 and now the last time the queue went idle was: 1435366767441. If these numbers are the same your activity might be hogging the event queue.
        at android.support.test.runner.MonitoringInstrumentation.startActivitySync(MonitoringInstrumentation.java:274)
        at android.test.InstrumentationTestCase.launchActivityWithIntent(InstrumentationTestCase.java:119)
        at android.test.ActivityInstrumentationTestCase2.getActivity(ActivityInstrumentationTestCase2.java:106)
        at xx.xxxxx.app.cucumber.ProductListFeatureSteps.der_Nutzer_befindet_sich_auf_dem_Home_Bildschirm(ProductListFeatureSteps.java:39)
        at xx.xxxxx.app.cucumber.ProductListFeatureSteps.der_Nutzer_befindet_sich_auf_den_Home_Bildschirm(ProductListFeatureSteps.java:46)
        at ✽.Angenommen der Nutzer befindet sich auf den Home-Bildschirm(features/home/anzeige_von_produktlisten.feature:14)


If I add a <at> After method and finish the current Activity all scenarios are started and there is no blocking any more. But tests with multiple Activities still do not run successfully because not all Activities are stopped.

    <at> cucumber.api.java.After
    public void after() {
        getActivity().finish();
    }

It seems odd to me that I have to finish the Activies myself. Why is startActivitySync() blocking in my tests?

/Tim



grandcentrix GmbH
Schanzenstrasse 6-20
51063 Köln, Deutschland

phone: +49 221 677 860 0
fax: +49 221 677 860 99

Amtsgericht Köln | HRB  70119 | Geschäftsführer: R. Rottmann, M. Willnow | USt.-IdNr.: DE266333969

--
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.
newstester3 | 25 Jun 21:32 2015
Picon

[Cucumber] Cucumber - Is it possible to share a login step between multiple scenario?

Hi,

I am new to cucumber.  Is it possible to share a login step between multiple scenario?   Please provide instructions and explain.

If I have similar to the below but the browser close after Scenario 1 complete.  At the Scenario 2, new browser open but not at the home page.

Feature: My feature
.

  Background:

  Scenario: Test1
    When Do the login
    Then At home page, navigate to "a" page
    And validate something

  Scenario: Test2
    When At home page, navigate to "b" page
    Then validate something

--
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.
Shantanu Mishra | 25 Jun 11:53 2015
Picon

[Cucumber] Cucumber Exception

I am trying to run a simple selenium script using cucumber
---------------------------------------------------------------------
public class SeleniumTest {
public static void main(String args[])
{
System.setProperty("webdriver.ie.driver", "D:\\TECHM\\SM291459\\Jars\\IEDriverServer_x64_2.45.0\\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver();
driver.navigate().to("http://www.store.demoqa.com");
driver.findElement(By.xpath("//a[ <at> class='account_icon']")).click();
driver.findElement(By.name("log")).sendKeys("testuser_1");
driver.findElement(By.id("pwd")).sendKeys("Test <at> 123");
driver.findElement(By.id("login")).click();
System.out.println("Logged in Succesfully");
driver.quit();
}
-------------------------------------------------------------------------
This is my test runner classes
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;


<at> RunWith(Cucumber.class)
<at> CucumberOptions(
features = "Feature"
,glue={"stepDefinition"}
)
public class TestRunner {

}
---------------------------------------------------------------------
My feature file
Feature: Login Action

Scenario: Successful Login with Valid Credentials
Given User is on Home Page
When User Navigate to LogIn Page
And User enters UserName and Password
Then Message displayed Login Successfully
Scenario: Successful LogOut
When User LogOut from the Application
Then Message displayed LogOut Successfully
--------------------------------------------------------------------------
I have all the jars added.
Bu still I m getting the below exception
------------------------------------------------
WARNING: Cucumber-JVM's --format option is deprecated. Please use --plugin instead.
Exception in thread "main" cucumber.runtime.CucumberException: Failed to instantiate public cucumber.runtime.java.JavaBackend(cucumber.runtime.io.ResourceLoader) with [cucumber.runtime.io.MultiLoader <at> 4038d0]
at cucumber.runtime.Reflections.newInstance(Reflections.java:44)
at cucumber.runtime.Reflections.instantiateSubclasses(Reflections.java:30)
at cucumber.runtime.Runtime.loadBackends(Runtime.java:97)
at cucumber.runtime.Runtime.<init>(Runtime.java:64)
at cucumber.api.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main.main(Main.java:18)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at cucumber.runtime.Reflections.newInstance(Reflections.java:41)
... 5 more
Caused by: java.lang.NoSuchMethodError: cucumber.runtime.io.ClasspathResourceLoader.getAnnotations(Ljava/lang/String;)Ljava/util/Collection;
at cucumber.runtime.java.ClasspathMethodScanner.findCucumberAnnotationClasses(ClasspathMethodScanner.java:75)
at cucumber.runtime.java.ClasspathMethodScanner.<init>(ClasspathMethodScanner.java:23)
at cucumber.runtime.java.JavaBackend.<init>(JavaBackend.java:30)
... 10 more
-------------------------------------------------------------------------------------
Can anyonce please help me in this. 



--
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.
Grigore Dragan | 23 Jun 10:51 2015
Picon

[Cucumber] [Android][Jacoco] Jacoco test coverage when run with CucumberInstrumentation

Hi,

Is it possible to get the test coverage with jacoco when I test with Android's JUnit extension.

So my configurations are:

build.gradle

android {
    jacoco {
        version = '0.7.0.201403182114'
    }

   ...............

   defaultConfig {

   ..........
        testInstrumentationRunner "cucumber.api.android.CucumberInstrumentation"
    }

   ...............

   buildTypes {
        ..........
        debug {
            testCoverageEnabled true
        }
    }
    ...............

java test case

<at> RunWith(Cucumber.class)
<at> CucumberOptions(
        features = "features",
        glue = "com.package.name"
)
public class ApplicationTest extends ApplicationTestCase<Application> {

    public ApplicationTest() {
        super(Application.class);
    }
}

When I run this command "gradlew :library:connectedCheck" jacoco generates an empty file build/outputs/reports/coverage/debug/index.html

Thank you.

--
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.
LiohAu | 24 Jun 16:49 2015
Picon

[Cucumber] Specifications of critical systems

Hello,

I work in a company that makes software medical devices, so we have a lot of specifications (thousands)

In almost each of our software there is at least one complex algorithm with a lot of rules and each rules depends on a lot of input data.

So how do you write specifications for this kind of system using the gherkin format ? I understood that I should not put irrelevant details in the scenario in order to make it more readable, some people here suggested to use attached excel files, but what if these data are relevant to understand what must be done ? 
Complex systems really exists, and I don't think it's the goal of specifications to hide this complexity. But it should at least help to understand the system...

An typical example we could have is a rule that depends on a treatment profile (containing dozen of parameters), the patient history (previous results of several different tests), patient profile (weight, sex..) to determine the appropriate dosage for a drug.
This is usually the kind of thing that is specified via a diagram or by hundreds of individual sentences (which makes it traceable but unreadable..) or both.


--
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.
Aleksandar Kostadinov | 24 Jun 14:47 2015
Picon

[Cucumber] yard-cucumber compatible with 2.0 ?

Hello, to install yard-cucumber it also is necessary to install cucumber 1.3. Any alternatives? Or can yard-cucumber be made compatible?

--
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.
Sai Kumar | 22 Jun 13:12 2015
Picon

[Cucumber] generating seperate Cucumber reports for each node.

Hi,
I am running tests in parallel,and i used maven-cucumber-reporting dependency to generate reports.
but i get malformedJson exception when running on 2 nodes.
how can i generate separate reports for each node.
Thanks in advance .
Regards,
saikumar.

--
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.
aslak hellesoy | 21 Jun 07:22 2015
Picon

[Cucumber] The cucumber/cucumber repo has moved

The new home is https://github.com/cucumber/cucumber-ruby

There are two reasons for this move:
* Stay consistent with other Cucumber implementations (cucumber-jvm, cucumber-js etc)
* We need a parent repo for all things common to various implementations

The wiki is still in the same location: https://github.com/cucumber/cucumber/wiki

Developers - you need to update your remotes:

Aslak

--
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.
Gaurang shah | 19 Jun 12:16 2015
Picon

[Cucumber] [Cucumber-JVM] Run Scenerio/Feature in specific order

Hi Guys, 

I am using cucumber with webdriver to test my website, However the website I am testing is like a shopping card, where once user fill few form and creates order, other user logs in verifies this forms and last third user logs in, checks details and dispatches order. 

For this I have write down three feature files, once for creating order, another for verifying and third for dispatching. 

However the problem I am facing right now is, they are running in alphabetical order,  would someone please let me know. 

  1. is there any way to make scenarios dependent on another scenario, I find out that there is something called GivenScenario, however it has been removed from latest version of cucumber. Is there any alternative way to achieve same 
  2. Is there  way to provide execution order for scenario or feature.

--
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.
Anand Balasundaram | 18 Jun 15:56 2015
Picon

[Cucumber] Why a feature file can't run multiple time?

I want to run same feature(or scenario) multiple times. But I got to know that it was not possible in cucumber. 
Can someone explain me why it is not possible?

It will be more useful to explain it in light of the structure of cucumber.

--
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