Comments (10)
Hi @albertolopez55 , can you provide a sample project to demonstrate this?
from courgette-jvm.
Hi @prashant-ramcharan, I'm facing the same issue when trying to execute my test suite from within a JAR. I've created a small project with just one feature and one test scenario in it, the path to the feature files that I'm using is the same as recommended by "java io.cucumber.core.cli.Main" using the "classpath:resources/" format. The problem happens when courgette tries to check feature re-runs, at this point the classpath URI does not contain any path and when the condition tries to retrieve that value fails.
Attempt to retrieve path from URI
Below is my runner and main configuration trying to emulate the cucumber CLI feature:
package com.test.courgette;
import courgette.api.CourgetteOptions;
import courgette.api.CucumberOptions;
import org.junit.runner.RunWith;
import courgette.api.CourgetteTestOutput;
import courgette.api.CourgetteRunLevel;
import courgette.api.junit.Courgette;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.model.InitializationError;
@RunWith(Courgette.class)
@CourgetteOptions(
threads = 1,
runLevel = CourgetteRunLevel.SCENARIO,
testOutput = CourgetteTestOutput.CONSOLE,
rerunFailedScenarios = true,
rerunAttempts = 1,
excludeFeatureFromRerun = "",
excludeTagFromRerun = "",
reportTitle = "Courgette test execution",
reportTargetDir = "build/reports/html/chartReport",
environmentInfo = "",
cucumberOptions =
@CucumberOptions(
features = "src/test/resources/features/",
glue = "com.test.courgette.steps",
tags = "@test",
plugin = {
"pretty",
"json:build/reports/json/cucumber.json",
"html:build/reports/html/cucumber.html",
"junit:build/reports/cucumber.xml"
}))
public class TestRunner {
public static void main(String[] args) throws InitializationError {
System.setProperty("cucumber.features", "classpath:features/");
new Courgette(TestRunner.class).run(new RunNotifier());
System.out.println("\n+++++++++++++++++++++++++\n");
System.out.println("\n++++EXECUTION FINISHED+++\n");
System.out.println("\n+++++++++++++++++++++++++\n");
}
}
I don't know if more problems will arise beyond this point, thanks!
from courgette-jvm.
Hi @FranciscoAAR Thanks for that.
Do you mind sharing the project so I can debug further, please?
from courgette-jvm.
from courgette-jvm.
Hi @prashant-ramcharan - Just following up to see if you need anything else from my side to continue working on this.
from courgette-jvm.
@FranciscoAAR Just had a look into your sample project.
This seems to work however you should not set the cucumber.features
to a classpath.
Courgette and Cucumber should resolve the features using the file system instead.
from courgette-jvm.
Related Issues (20)
- Not able to run Courgette class HOT 1
- Run on Appium 2 HOT 1
- How to have the status as WARNING in the Courgette Report? HOT 5
- How to embed a URL in the courgette report as URL instead of just String? HOT 2
- How to integrate courgette with docker container HOT 4
- How fix java.lang.ClassNotFoundException: Files\Git\cmd;;/ HOT 3
- Exposing Scenario hooks HOT 4
- Running on Specific Devices HOT 18
- Parallel execution is not working running test on real devices (Android or iOS), it works fine on emulator and simulator HOT 1
- With Appium version 2.x is throwing error "org.openqa.selenium.UnsupportedCommandException: Method has not yet been implemented" HOT 1
- Courgette error processing reports HOT 2
- No Courgette Report is being produced if there are no tags as specified by the user, not in the project repo though. HOT 1
- Unable to override cucumber tags from the maven command line HOT 5
- Maven Build is failing with this error 'java: package com.fasterxml.jackson.datatype.jdk8 does not exist' HOT 3
- Query : How to retrieve System and environment info details HOT 5
- Report output get only show all failed HOT 1
- Reports not generated HOT 9
- error=206, The filename or extension is too long trying to execute my project with courgette-jvm HOT 1
- Courgette report index.html is not generated properly HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from courgette-jvm.