prashant-ramcharan / courgette-jvm

Multiprocess | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level.
MIT License
131 stars 38 forks source link

Getting Initialization error while implementing parallel running with junit using courgette-jvm #284

Closed surekhau closed 3 years ago

surekhau commented 3 years ago

io.cucumber.core.gherkin.FeatureParserException: Failed to parse resource at: file:///D:/CanopyMaster/test-automation/src/test/resources/features/visualizer/Allocations.feature (419:2): inconsistent cell count within the table (444:2): inconsistent cell count within the table at io.cucumber.core.gherkin.messages.GherkinMessagesFeatureParser.parse(GherkinMessagesFeatureParser.java:52) at io.cucumber.core.feature.FeatureParser.parseResource(FeatureParser.java:47) at java.util.function.BiFunction.lambda$andThen$0(Unknown Source) at io.cucumber.core.resource.ResourceScanner.lambda$processResource$1(ResourceScanner.java:79) at io.cucumber.core.resource.PathScanner$ResourceFileVisitor.visitFile(PathScanner.java:75) at io.cucumber.core.resource.PathScanner$ResourceFileVisitor.visitFile(PathScanner.java:60) at java.nio.file.Files.walkFileTree(Unknown Source) at io.cucumber.core.resource.PathScanner.findResourcesForPath(PathScanner.java:53) at io.cucumber.core.resource.PathScanner.findResourcesForUri(PathScanner.java:31) at io.cucumber.core.resource.ResourceScanner.findResourcesForUri(ResourceScanner.java:61) at io.cucumber.core.resource.ResourceScanner.scanForResourcesUri(ResourceScanner.java:134) at io.cucumber.core.runtime.FeaturePathFeatureSupplier.loadFeatures(FeaturePathFeatureSupplier.java:62) at io.cucumber.core.runtime.FeaturePathFeatureSupplier.get(FeaturePathFeatureSupplier.java:45) at courgette.runtime.CourgetteLoader.(CourgetteLoader.java:37) at courgette.api.junit.Courgette.(Courgette.java:33) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

prashant-ramcharan commented 3 years ago

This is a Cucumber exception that suggests your feature file cannot be parsed.

Looks like the tables in your feature file Allocations.feature at line 419 and 444 needs fixing.

Perhaps you missing a | character ?

surekhau commented 3 years ago

Hi Prashant-Ramcharan,

Thanks for the Reply. I resolved the above issue with your suggestion. But after that i am getting the below error.

java.lang.NoClassDefFoundError: org/apache/http/conn/ssl/TrustAllStrategy at courgette.runtime.CucumberReportPublisher.createHttpClient(CucumberReportPublisher.java:123) at courgette.runtime.CucumberReportPublisher.(CucumberReportPublisher.java:43) at courgette.runtime.CourgetteReporter.publishCucumberReport(CourgetteReporter.java:84) at courgette.runtime.CourgetteRunner.createCucumberReport(CourgetteRunner.java:176) at courgette.api.junit.Courgette.run(Courgette.java:64) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.ssl.TrustAllStrategy at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 11 more

On Fri, Jul 9, 2021 at 4:17 PM Prashant Ramcharan @.***> wrote:

This is a Cucumber exception that suggests your feature file cannot be parsed.

Looks like the tables in your feature file Allocations.feature at line 419 and 442 needs fixing.

Perhaps you missing a | character ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/prashant-ramcharan/courgette-jvm/issues/284#issuecomment-877094802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJK5VG2JLDGVLTJTD2JZA3TTW3HVDANCNFSM5ACCWV5A .

prashant-ramcharan commented 3 years ago

Hi @surekhau

Do you have the org.apache.httpcomponents:httpclient dependency in your pom.xml or build.gradle file ?

Can you try removing this dependency?

Courgette includes this dependency so it could be that it's conflicting in your project.

surekhau commented 3 years ago

Hi @prashant-ramcharan

I don't have that dependency in my pom.xml file. I added it and tried now the above error is resolved but all tests are failing and I didn't see the browser opened.

prashant-ramcharan commented 3 years ago

Please provide a demo project or try one of the Courgette examples project.

https://github.com/prashant-ramcharan/courgette-jvm-example

surekhau commented 3 years ago

sure @prashant-ramcharan let me try some demo project and give you more details. Thanks

kewalbotadara08 commented 3 years ago

Encountering Below error after implementing repo, steps definations are already present Screenshot 2021-07-22 at 16 09 45

@engine-prod @validation-enginehealthcheck @cs-engine-healthcheck @AT-367 Scenario Outline: Validate the status of trifacta server # src/test/resources/features/engine/TrifactaScenarios.feature:14 Given I am on login page of Engine # null When I login to engine with valid user credentials # null Then I check trifacta status # null

@engine-prod @engine-healthcheck @cs-engine-healthcheck @AT-367 Scenario Outline: Validate if the user can successfully process a CanopyUlFileUpload # src/test/resources/features/engine/data_upload/CanopyUlFileUpload.feature:20

Undefined scenarios: file:///Users/kewalbotadara/Documents/GitHub/test-automation/src/test/resources/features/engine/TrifactaScenarios.feature:14 # Validate the status of trifacta server

1 Scenarios (1 undefined) 3 Steps (2 skipped, 1 undefined) 0m1.586s

You can implement missing steps with the snippets below:

@Given("I am on login page of Engine") public void i_am_on_login_page_of_engine() { // Write code here that turns the phrase above into concrete actions throw new io.cucumber.java.PendingException(); }

prashant-ramcharan commented 3 years ago

Hello,

Did you try?

 glue = { "cloud.canopy.steps" }
surekhau commented 3 years ago

@prashant-ramcharan tried this glue = { "cloud.canopy.steps" } but doesn't work

prashant-ramcharan commented 3 years ago

Please share the project (or a demo project) for me to advise any further.

surekhau commented 3 years ago

Sure, will share the demo project soon, Thank you

kewalbotadara08 commented 3 years ago

Hi Prashant, is it possible for you to conduct small session to help us regarding this issue