Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be able to run specs after configuring package_to_scan #167

Closed
sswaroopgupta opened this issue Jun 13, 2018 · 2 comments
Closed

Should be able to run specs after configuring package_to_scan #167

sswaroopgupta opened this issue Jun 13, 2018 · 2 comments

Comments

@sswaroopgupta
Copy link
Contributor

sswaroopgupta commented Jun 13, 2018

Actual behavior
When package_to_scan is specified, the step implementations are not recongnized

Steps to replicate

  • Create a gauge-maven project
    gauge init java_maven

with group id grp1

  • The default package is grp1
  • Now add a package grp2 at the same level as grp1
  • Add a package level2 inside grp2
  • Create a class inside grp2.level2
package grp2.level2;

import com.thoughtworks.gauge.Step;
import com.thoughtworks.gauge.Table;
import com.thoughtworks.gauge.TableRow;

import java.util.HashSet;

import static org.assertj.core.api.Assertions.assertThat;

public class StepImplementation {

    @Step("Something")
    public void implementation1() {

    }
}
  • Use step "Something" in example.spec
  • Run the spec example.spec from the IDE.

Execution is successful

  • Add package_to_scan=grp1,grp2.level2
  • Re-load the project
  • Execute the same spec

During validation the steps are marked as unimplemented

Version

Gauge version: 0.9.9.nightly-2018-06-01
Commit Hash: 812f26e

Plugins
-------
java (0.6.9.nightly-2018-06-06)

Related to #161

@nehashri
Copy link
Contributor

Seems to be working fine.
Check if you have added the correct nightly version of gauge-java in the pom.xml as well.

@sswaroopgupta
Copy link
Contributor Author

Working as expected with

Gauge version: 1.0.1.nightly-2018-06-19
Commit Hash: 583ef1d

Plugins
-------
java (0.6.9.nightly-2018-06-12)

Re-load after making the following pom changes.

 <repositories>
        <repository>
            <id>maven-gauge-java</id>
            <url>https://dl.bintray.com/gauge/maven-gauge-java</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>com.thoughtworks.gauge</groupId>
            <artifactId>gauge-java</artifactId>
            <version>0.6.9.nightly-2018-06-12</version>
            <scope>test</scope>
        </dependency>
...
    </dependencies>

@ghost ghost removed the ready for QA label Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants