Launch configuration self-test.feature references non-existing project Substeps

992 views
Skip to first unread message

Russell Watson-Thomas

unread,
Aug 5, 2013, 12:39:09 PM8/5/13
to subs...@googlegroups.com
Hello folks,

Complete new-guy-to-substeps question here, but I'm getting this error when trying to run the sample project. I'm assuming it's not setup to run in full for the features and steps it has examples for, but could someone let me know if this is simply a misconfiguration issue somewhere along the line?

It's entirely possible I've screwed up setting up my Eclipse + Maven + JDK 7 + Substeps plugin etc config..

Any help would be greatly appreciated, substeps has real merit and I'd just like to get myself to the point where I can see a run work, with tests run (currently, run as a maven test it completes but with 0 tests run... hence trying the plugin). Once there, I'll be set to just push to a repository with hand-written features outside the IDE.

Thanks,

Russ

Ian Moore

unread,
Sep 30, 2013, 10:26:44 AM9/30/13
to subs...@googlegroups.com
Hi Russ,

Firstly, apologies for the lack of a reply sooner, I think this must have slipped under everyone's radar..

Anyway, to run the example project via maven type:

mvn clean integration-test

this will run the features using HTMLUnit.  Change the values in localhost.properties to use Firefox or Chrome.

in pom.xml around line 92 you can see that the Substeps plugin is bound to the integration-test phase of maven rather than 'test'
   ....
   <executions>
        <execution>
            <id>SubSteps Test</id>
            <phase>integration-test</phase>

it is possible to run the plugin in any phase, however typically 'the build' will also have compiled the application under test, run unit tests, packaged up, deployed, started the container etc in the preceding phases.  More information on Maven's build phases can be found here.

To run the features via the substeps eclipse plugin (and I'm assuming you've got 0.2.7 of the plugin installed)

select the project in the package or project explorer, context (typically right) click, Properties. Select 'Substeps' and check 'Enable project specific settings'.  Then disable 'Show substeps problems' and set the paths to the features and substeps thus: src/test/resources/features and src/test/resources/substeps.  Click Apply.

You will now be able to select a feature, context click, Run As "Substeps feature test".  If you wish to use Chrome along with the eclipse plugin, the initial run will fail as the path to Chromedriver will be missing.  This can be set, by again selecting the feature, context click, Run configurations, 'Arguments' tab and adding -Dwebdriver.chrome.driver= <path to chromedriver> in the VM arguments text field.

If you would like to run your tests with the current version of firefox, until we get another version of webdriver substeps out (hopefully not too long!) you will need to override the version of selenium-webdriver used:

in pom.xml add the highlighted text:

    <dependency>
        <groupId>com.technophobia.substeps</groupId>
        <artifactId>webdriver-substeps</artifactId>
        <version>${substeps.webdriver.version}</version>
        <scope>test</scope>
       
        <exclusions>
            <exclusion>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
            </exclusion>
        </exclusions>

       
    </dependency>
   
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.35.0</version>
    </dependency>


I hope that helps and apologies again for the tardy reply!
Cheers
Ian
Reply all
Reply to author
Forward
0 new messages