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

Cucumber integration with Jenkins on Remote Machine builds successfully but has black screenshots in the Serenity Reports when used with net.serenity-bdd maven plugin #2433

Closed
Subhapriyo2607 opened this issue Apr 16, 2021 · 0 comments

Comments

@Subhapriyo2607
Copy link

Subhapriyo2607 commented Apr 16, 2021

pom.xml

`

4.0.0

<groupId>OBM12-Cucumber</groupId>
<artifactId>OBM12-Cucumber</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
    <cucumber.version>5.6.0</cucumber.version>
    <junit.version>4.13</junit.version>
    <serenity.version>2.2.8</serenity.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
    </dependency>
    
    <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
	<dependency>
	    <groupId>org.seleniumhq.selenium</groupId>
	    <artifactId>selenium-java</artifactId>
	    <version>3.141.59</version>
	</dependency>

	<!-- https://mvnrepository.com/artifact/net.serenity-bdd/serenity-core -->
	<dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-core</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay</artifactId>
        <version>${serenity.version}</version>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-core</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
	<!-- https://mvnrepository.com/artifact/net.serenity-bdd/serenity-cucumber5 -->
	<dependency>
	    <groupId>net.serenity-bdd</groupId>
	    <artifactId>serenity-cucumber5</artifactId>
	    <version>2.2.5</version>
	    <scope>test</scope>
	</dependency>
	
	<dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.6.1</version>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.7.0</version>
            <configuration>
                <encoding>UTF-8</encoding>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-plugin</artifactId>
			<version>2.22.0</version>
			<configuration>
				<!-- <parallel>methods</parallel>
				<useUnlimitedThreads>true</useUnlimitedThreads> -->
				<testFailureIgnore>true</testFailureIgnore>
			</configuration>
		</plugin>
		<plugin>
			<groupId>net.serenity-bdd.maven.plugins</groupId>
			<artifactId>serenity-maven-plugin</artifactId>
			<version>${serenity.version}</version>
			<executions>
				<execution>
					<id>serenity-reports</id>
					<phase>post-integration-test</phase>
					<goals>
						<goal>aggregate</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
    </plugins>
</build>
`

Jenkins Console Output:

Established TCP socket on 53072 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f D:\IDR REG GITLAB\code\OBM12-Cucumber\pom.xml clean test serenity:aggregate -Dcucumber.options=--tags '@TC-04 [INFO] Scanning for projects... [INFO] [INFO] -------------------< OBM12-Cucumber:OBM12-Cucumber >-------------------- [INFO] Building OBM12-Cucumber 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ OBM12-Cucumber --- [INFO] Deleting D:\IDR REG GITLAB\code\OBM12-Cucumber\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ OBM12-Cucumber --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory D:\IDR REG GITLAB\code\OBM12-Cucumber\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ OBM12-Cucumber --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ OBM12-Cucumber --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 19 resources [INFO] [INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ OBM12-Cucumber --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 18 source files to D:\IDR REG GITLAB\code\OBM12-Cucumber\target\test-classes [INFO] [INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ OBM12-Cucumber --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running com.bch.obm.RunCucumberTest Apr 16, 2021 5:10:06 AM io.cucumber.core.options.CucumberPropertiesParser parse WARNING: Passing commandline options via the property cucumber.options` has been deprecatedin favour of explicitly using property names.
Please use these instead: [cucumber.ansi-colors.disabled, cucumber.execution.dry-run, cucumber.execution.limit, cucumber.execution.order, cucumber.execution.strict, cucumber.execution.wip, cucumber.features, cucumber.filter.name, cucumber.filter.tags, cucumber.glue, cucumber.object-factory, cucumber.plugin, cucumber.snippet-type]
126 [main] WARN io.cucumber.junit.CucumberSerenityRunner - By default Cucumber is running in --non-strict mode.
This default will change to --strict and --non-strict will be removed.
You can use --strict or @CucumberOptions(strict = true) to suppress this warning
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/access_search/access_search.feature
1498 [main] INFO -


 _______. _______ .______       _______ .__   __.  __  .___________.____    ____ 
/       ||   ____||   _  \     |   ____||  \ |  | |  | |           |\   \  /   / 

| (----| |__ | |_) | | |__ | \| | | | ---| |----\ \/ / \ \ | __| | / | __| | . | | | | | _ /
.----) | | |
___ | |\ ----.| |____ | |\ | | | | | | |
|/ ||| | `._____||_____||__| _| || || |__|

News and tutorials at http://www.serenity-bdd.info
Documentation at https://wakaleo.gitbooks.io/the-serenity-book/content/
Join the Serenity Community on Gitter: https://gitter.im/serenity-bdd/serenity-core
Serenity BDD Support and Training at http://serenity-bdd.info/#/trainingandsupport

1506 [main] INFO - Test Suite Started: Access search
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/account_info_edit/account_info_edit.feature
1527 [main] INFO - Test Suite Started: View/Edit-Account Information tab
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/ban_export_as_csv/ban_export_as_csv.feature
1532 [main] INFO - Test Suite Started: View/Edit-Billing account numbers tab
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/login/login.feature
1546 [main] INFO - Test Suite Started: Login
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/manage_account/manage_account.feature
1551 [main] INFO - Test Suite Started: Navigate through the manage account screens, get to BAN Tab and click on Add
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/mcmt_search/mcmt_search.feature
1556 [main] INFO - Test Suite Started: Message search
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/multiple_account_selection/multiple_account_selection.feature
1560 [main] INFO - Test Suite Started: Multiple account selection
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/paper_suppression/paper_suppression_filter.feature
1565 [main] INFO - Test Suite Started: Validate CSR-Registration -Paper suppression - Filter functionality
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/paper_suppression/paper_suppression_update.feature
1573 [main] INFO - Test Suite Started: Paper suppression screen
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/payment_method/payment_method.feature
1577 [main] INFO - Test Suite Started: CSR-View/Edit-Payment Method- Save functionality
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/preauthorized_payment/preauthorized_payment.feature
1582 [main] INFO - Test Suite Started: Pre Authorized Payment
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/single_account_selection/single_account_selection.feature
1586 [main] INFO - Test Suite Started: single account selection
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/transaction_logs/transaction_logs_search.feature
1589 [main] INFO - Test Suite Started: Reports- Transaction log search
Feature from file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/src/test/resources/features/ban_export_as_csv/ban_export_as_csv.feature
1899 [main] INFO -


|_ | / | _| / | |/ \ | _ _ | | _ \
| | | | _
\ | | _
\ | | / _ \ | |
) || | | | | | | |
| | | |
) || | ) || |/ ___ | _ < | | | || || |
|
| |
|
/ |
| |/ |// __| _|| |_____|___/

Check validation for Export csv file(view/edit-billing-account-numbers-tab;check-validation-for-export-csv-file)

2137 [main] WARN net.thucydides.core.requirements.model.cucumber.CucumberParser - Couldn't read the feature file D:\IDR REG GITLAB\code\OBM12-Cucumber\src\test\resources\features\add_ban\add_ban.feature - it will be ignored
2160 [main] WARN net.thucydides.core.requirements.model.cucumber.CucumberParser - Couldn't read the feature file D:\IDR REG GITLAB\code\OBM12-Cucumber\src\test\resources\features\delete_ban\delete_ban.feature - it will be ignored
3103 [main] INFO net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver - Instantiating driver
3105 [main] INFO net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver - Driver capabilities: Capabilities {browserName: internet explorer, ensureCleanSession: true, ignoreZoomSetting: true, javascriptEnabled: true, loggingPrefs: org.openqa.selenium.logging..., nativeEvents: true, platform: WINDOWS, requireWindowFocus: false, takesScreenshot: true, version: }
Started InternetExplorerDriver server (64-bit)
3.150.1.0
Listening on port 44862
Only local connections are allowed
Apr 16, 2021 5:10:11 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
145774 [main] INFO -
__ _____ _____ ____ _____ ____ _ ____ ____ _____ ____
_ \ \ |_ | / | | | _ \ / \ / |/ || ___| _ \
(
)
| | | | | | _
\ | | | |
) / _ \ _ \
| | | | | |
|__| | | | | | ) || | | / ___ \ ) |) | || || |
(
) | | |
| |_____|
/ || || // __/|/|_____|__/
/
/

Check validation for Export csv file

1 Scenarios (1 passed)
7 Steps (7 passed)
2m24.594s

146010 [pool-2-thread-1] WARN net.thucydides.core.requirements.model.cucumber.CucumberParser - Couldn't read the feature file D:\IDR REG GITLAB\code\OBM12-Cucumber\src\test\resources\features\add_ban\add_ban.feature - it will be ignored
146028 [pool-2-thread-1] WARN net.thucydides.core.requirements.model.cucumber.CucumberParser - Couldn't read the feature file D:\IDR REG GITLAB\code\OBM12-Cucumber\src\test\resources\features\delete_ban\delete_ban.feature - it will be ignored
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 148.002 s - in com.bch.obm.RunCucumberTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[JENKINS] Recording test results
[INFO]
[INFO] -------------------< OBM12-Cucumber:OBM12-Cucumber >--------------------
[INFO] Building OBM12-Cucumber 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- serenity-maven-plugin:2.2.8:aggregate (default-cli) @ OBM12-Cucumber ---
[WARNING] Couldn't read the feature file D:\IDR REG GITLAB\code\OBM12-Cucumber\src\test\resources\features\add_ban\add_ban.feature - it will be ignored
[WARNING] Couldn't read the feature file D:\IDR REG GITLAB\code\OBM12-Cucumber\src\test\resources\features\delete_ban\delete_ban.feature - it will be ignored
[WARNING] Couldn't read the feature file D:\IDR REG GITLAB\code\OBM12-Cucumber\src\test\resources\features\delete_ban\delete_ban.feature - it will be ignored
[WARNING] Couldn't read the feature file D:\IDR REG GITLAB\code\OBM12-Cucumber\src\test\resources\features\add_ban\add_ban.feature - it will be ignored
[INFO] Test results for 1 tests generated in 3.2 secs in directory: file:/D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/target/site/serenity/
[INFO] -----------------------------------------
[INFO] SERENITY TESTS : SUCCESS
[INFO] -----------------------------------------
[INFO] | Tests executed | 1
[INFO] | Tests passed | 1
[INFO] | Tests failed | 0
[INFO] | Tests with errors | 0
[INFO] | Tests compromised | 0
[INFO] | Tests pending | 0
[INFO] | Tests ignored/skipped | 0
[INFO] ------------------------ | --------------
[INFO] | Total Duration | 2m 24s
[INFO] | Fastest test took | 2m 23s
[INFO] | Slowest test took | 2m 23s
[INFO] -----------------------------------------
[INFO]
[INFO] SERENITY REPORTS
[INFO] - Full Report: file:///D:/IDR%20REG%20GITLAB/code/OBM12-Cucumber/target/site/serenity/index.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:46 min
[INFO] Finished at: 2021-04-16T05:12:42-04:00
[INFO] ------------------------------------------------------------------------
`

Now when I open the Full Report file, I see the Serenity BDD report as shown below:
Serenity Report images:

https://i.stack.imgur.com/AgcUn.png
https://i.stack.imgur.com/Q356G.png

### Please note that Jenkins is also running as a service and my server is located on a remote machine, I have setup Jenkins in a way to run the test on the remote server by pointing the root pom to the codebase on the server as below:

https://i.stack.imgur.com/LupE6.png

Please let me know how i can overcome this issue and generate the test scenario screenshots.

@Subhapriyo2607 Subhapriyo2607 changed the title Cucumber integration with Jenkins builds successfully but has black screenshots in the Serenity Reports when used with net.serenity-bdd maven plugin Cucumber integration with Jenkins on Remote Machine builds successfully but has black screenshots in the Serenity Reports when used with net.serenity-bdd maven plugin May 7, 2021
@wakaleo wakaleo closed this as completed Feb 12, 2022
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

2 participants