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

Arquillian TestNG integration fails to execute its "arquillian" group methods if a set of groups is specified in surefire #395

Open
starksm64 opened this issue Jun 3, 2022 · 0 comments

Comments

@starksm64
Copy link
Member

Copied over from the old Red Hat JIRA as this issue still impacts the CDI TCK Java SE tests.

Issue Overview

[Tomas Remes] added a comment -
I came across this as well. This problem manifests simply in the case when you specify some included testgroup in the surefire plugin. The Arquillian @BeforeSuite method doesn't belong to this testgroup (it seems that inheritGroups param is not evaluated at all. I am not sure why) so it's not executed. Simple workaround in this case is to include also "arquillian" group. I am not sure if it is/ is not a testng bug. You can see testng-team/testng#313 and testng-team/testng#184

For example, this should work:

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <groups>se</groups>
                            <systemPropertyVariables>
                                <arquillian.launch>weld-se</arquillian.launch>
                                <libPath>${project.build.outputDirectory}</libPath>
                            </systemPropertyVariables>
                            <suiteXmlFiles>
                                <suiteXmlFile>target/suites/tck-core-suite.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </plugin>

but this is required:

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <!-- arquillian group is workaround for ARQ-127 -->
                            <groups>se,arquillian</groups>
                            <systemPropertyVariables>
                                <arquillian.launch>weld-se</arquillian.launch>
                                <libPath>${project.build.outputDirectory}</libPath>
                            </systemPropertyVariables>
                            <suiteXmlFiles>
                                <suiteXmlFile>target/suites/tck-core-suite.xml</suiteXmlFile>
                            </suiteXmlFiles>
                        </configuration>
                    </plugin>
Expected Behaviour

The "arquillian" group should always be included in addition to any external groups since the adaptor relies on these.

Current Behaviour

Specifycing

Steps To Reproduce

Run the CDI TCK Java SE tests

Additional Information
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

1 participant