Giter Site home page Giter Site logo

Runner file about quarkus-cucumber HOT 11 CLOSED

quarkiverse avatar quarkiverse commented on September 23, 2024
Runner file

from quarkus-cucumber.

Comments (11)

christophd avatar christophd commented on September 23, 2024 1

@grandmaximum thanks for reporting! Fixed the tag filtering support in #8

from quarkus-cucumber.

stuartwdouglas avatar stuartwdouglas commented on September 23, 2024 1

Here you go: #9

Might take a bit to get into central.

from quarkus-cucumber.

christophd avatar christophd commented on September 23, 2024 1

@grandmaximum the issue regarding RestAssured seems to be different. Could you please open a separate issue for this?

About to close the initial issue regarding Runner file then

from quarkus-cucumber.

christophd avatar christophd commented on September 23, 2024

@grandmaximum can you please have a look at #4 which was released with #5. It may help you to set custom glue, features and tags via @CucumberOptions.

let me know if this works for you

from quarkus-cucumber.

grandmaximum avatar grandmaximum commented on September 23, 2024

@christophd It seems like the tag feature isn't really working. Whether or not I use tags and define them in the runner file, all the tests in the specified .feature-file is still run.

EDIT:
The problem is that we don't filter the tests based on the tag expressions, which could be solved this way: quarkusio/quarkus#11045 (comment)

A bit ironic that this was the broken link in my last post.

from quarkus-cucumber.

christophd avatar christophd commented on September 23, 2024

@grandmaximum let me check. how do you define the tags in the runner file?

from quarkus-cucumber.

grandmaximum avatar grandmaximum commented on September 23, 2024

@RunWith(Cucumber.class)
@CucumberOptions(
monochrome = true,
features = "src/test/java/ekn/information/v/hello/Hello.feature",
glue ="ekn.information.v.hello",
tags = "@Saknar"
)
public class HelloRunnerQuarkiverse extends CucumberQuarkusTest
{
}

See my edited answer on the last post.

from quarkus-cucumber.

grandmaximum avatar grandmaximum commented on September 23, 2024

@stuartwdouglas When are you planning on 0.4.0? Would be awesome if I could test the tag filtering.

from quarkus-cucumber.

grandmaximum avatar grandmaximum commented on September 23, 2024

I ran into the same problem as mentioned in quarkusio/quarkus#10435.

When I run a steps method which uses a Restassured call I get the following error:

      java.util.ServiceConfigurationError: org.apache.groovy.json.FastStringServiceFactory: org.apache.groovy.json.DefaultFastStringServiceFactory not a subtype
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1236)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
	at org.apache.groovy.json.internal.FastStringUtils$ServiceHolder.loadService(FastStringUtils.java:41)
	at org.apache.groovy.json.internal.FastStringUtils$ServiceHolder.<clinit>(FastStringUtils.java:33)
	at org.apache.groovy.json.internal.FastStringUtils.getService(FastStringUtils.java:55)
	at org.apache.groovy.json.internal.FastStringUtils.toCharArray(FastStringUtils.java:66)
	at org.apache.groovy.json.internal.CharBuf.addJsonEscapedString(CharBuf.java:341)
	at org.apache.groovy.json.internal.CharBuf.addJsonEscapedString(CharBuf.java:337)
	at groovy.json.JsonOutput.prettyPrint(JsonOutput.java:213)
	at groovy.json.JsonOutput$prettyPrint.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
	at io.restassured.internal.path.json.JsonPrettifier.prettifyJson(JsonPrettifier.groovy:25)
	at io.restassured.internal.path.json.JsonPrettifier$prettifyJson.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
	at io.restassured.internal.support.Prettifier.prettify(Prettifier.groovy:60)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
	at 
...

The problem occures on the first class being loaded by RestAssures classloader. Is there a possible way around this or is RestAssured simply imcompatible with dynamic tests (@testfactory) and thus quarkus-cucumber?

My RestAssured call:

        responseSpara = RestAssured.given().log().all()
                                            .contentType("application/json")
                                            .body(userData)
                                            .header("USERID", "TESTID")
                                            .header("USERNAME", "TESTER")
                                            .when()
                                            .post("/save")
                                            .then()
                                            .statusCode(200)
                                            .extract()
                                            .response();

@stuartwdouglas

from quarkus-cucumber.

bella-daza avatar bella-daza commented on September 23, 2024

Hi, I try extension but i don't have any result. I have an app Quarkus. I did like here : https://github.com/quarkiverse/quarkus-cucumber/blob/main/docs/modules/ROOT/pages/index.adoc

so, i have a runner file :

`package test.it.runner;

import io.cucumber.junit.Cucumber;
import io.quarkiverse.cucumber.CucumberOptions;
import io.quarkiverse.cucumber.CucumberQuarkusTest;

import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(features = { "src/test/resources/test/it" }, glue = {
"test.it" }, plugin = { "pretty", "html:target/cucumber-reports/report.html",
"junit:target/cucumber-reports/junit-report.xml", "io.qameta.allure.cucumber6jvm.AllureCucumber6Jvm" })

public class RunnerCucumberIT extends CucumberQuarkusTest {
public static void main(String[] args) {
runMain(RunnerCucumberIT.class, args);
}
}
`
And I have a .feature file and a test file but when I did play to RunnerCucumberIT any test is started. And is I got mvn verify only unit test are started.

My test file for bdd - cucumber test is methods empty so, I wait errors about that but nothig is comming.

Is there any other documentation that I can follow ?

Thanks you :)

from quarkus-cucumber.

christophd avatar christophd commented on September 23, 2024

@bella-daza could you please open separate issue. Your problem seems to not be related to this one.

from quarkus-cucumber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.