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

Once I add Manual tag in my feature file, the case that has step definitions is passed without executing #121

Open
arjunpn1983 opened this issue Jul 26, 2023 · 8 comments

Comments

@arjunpn1983
Copy link

No description provided.

@wakaleo
Copy link
Member

wakaleo commented Jul 26, 2023

I'm not clear on the problem you are encountering: if you mark a scenario as @Manual, you are indicating that you do not want to run it as part of your automated tests, so it will not be executed.

@nshiveg
Copy link

nshiveg commented Jul 26, 2023

Hi John,

I am also facing similar issue with the latest serenity.
I have a running scenario which gets executed perfectly fine. the moment I add another scenario with manual tag. The running scenario will not get executed.
The output will be having 1 pending and 1 passed. But the passed one is 0.2 seconds overall. Since it is not getting executed.

@arjunpn1983
Copy link
Author

When i execute one scenario with complete step definitions , my test runs as expected(Takes 14 secs). But once i add another scenario with @Manual tag ,then the total execution time of both scenarios is 423ms (report snapshot attached.) One case passes(If i add assert fail then case fails also) and other one is listed as manual

Attaching Feature file :

Feature: Launch url

Scenario: Launching url
Given User navigates to gmail url
And User enters admin login credentials for user "username" and password "passwd"
And User clicks on SIGN IN button

@Manual
Scenario: Launching urlpending
Given User navigates to gmail url is pending
And User enters admin login credentials
And User clicks on SIGN IN button1

image

@arjunpn1983
Copy link
Author

My POM:


4.0.0
net.serenitybdd.starter
cucumber-starter
1.0.0-SNAPSHOT
jar

<name>Sample Serenity BDD project using Cucumber</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>3.9.7</serenity.version>
    <junit-vintage-engine.version>5.9.3</junit-vintage-engine.version>
    <junit-platform-suite.version>1.9.3</junit-platform-suite.version>
    <cucumber-junit-platform-engine.version>7.2.3</cucumber-junit-platform-engine.version>
    <encoding>UTF-8</encoding>
    <tags></tags>
    <webdriver.base.url></webdriver.base.url>
</properties>
<dependencies>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-ensure</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-launcher</artifactId>
        <version>${junit-platform-suite.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-junit-platform-engine</artifactId>
        <version>${cucumber-junit-platform-engine.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.platform</groupId>
        <artifactId>junit-platform-suite</artifactId>
        <version>${junit-platform-suite.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${junit-vintage-engine.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.junit.vintage</groupId>
        <artifactId>junit-vintage-engine</artifactId>
        <version>${junit-vintage-engine.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.2.10</version>
    </dependency>
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.23.1</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.1.2</version>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>3.1.2</version>
            <configuration>
                <includes>
                    <include>**/*Test.java</include>
                    <include>**/Test*.java</include>
                    <include>**/*TestSuite.java</include>
                    <include>**/When*.java</include>
                </includes>
                <systemPropertyVariables>
                    <webdriver.base.url>${webdriver.base.url}</webdriver.base.url>
                </systemPropertyVariables>
                <parallel>classes</parallel>
                <parallel>methods</parallel>
                <useUnlimitedThreads>true</useUnlimitedThreads>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.version}</version>
            <configuration>
                <tags>${tags}</tags>
            </configuration>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

@wakaleo
Copy link
Member

wakaleo commented Jul 27, 2023

It seems to be a problem with the Cucumber parallel execution - @cliviu any ideas?

@cliviu
Copy link

cliviu commented Jul 28, 2023

Not sure now, I will have to take a look. Can you provide a small example to help me reproduce the problem?

@cliviu
Copy link

cliviu commented Jul 30, 2023

I cannot reproduce it with #121 and serenity version 3.9.7, all the tests are executed, even if I add a @Manual test

@wakaleo
Copy link
Member

wakaleo commented Jul 31, 2023

@cliviu they are all executed but they all get run in dry-run/suspended mode, so the actual steps don't get executed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants