Skip to content

Add a test scenario for @BeforeGroups having a dependsOnGroups - #2025

Open
jobayle wants to merge 1 commit into
testng-team:masterfrom
jobayle:bug/beforegroup-dependsongroups
Open

Add a test scenario for @BeforeGroups having a dependsOnGroups#2025
jobayle wants to merge 1 commit into
testng-team:masterfrom
jobayle:bug/beforegroup-dependsongroups

Conversation

@jobayle

@jobayle jobayle commented Mar 5, 2019

Copy link
Copy Markdown

TestNG ignores the dependsongroups parameter on @BeforeGroups annotations.

See: https://stackoverflow.com/questions/31929690/beforegroups-method-ignores-dependsongroups

TestNG ignores the dependsongroups parameter on @BeforeGroups
annotations.
@juherr

juherr commented Mar 7, 2019

Copy link
Copy Markdown
Member

Thanks for the test case but it doesn't follow the current convention.

BTW, I suppose it is a graph issue not covered by tests.

@krmahadevan Do you have time to check it?

@juherr juherr added this to the 7.0 milestone Mar 7, 2019
@juherr juherr added Feature: before/after @BeforeX / @AfterX configuration methods Feature: groups Test groups (include/exclude) Feature: dependsOn dependsOnMethods / dependsOnGroups ordering labels Mar 7, 2019
@krmahadevan

Copy link
Copy Markdown
Member

@jobayle - I am not sure if the test that you added is running as a group but it may be running as a standalone test. You would need to create a test that extends test.SimpleBaseTest and within an @Test method you would need to create a suite object add the group filtering, instantiate the TestNG object and then run the tests with it.

@juherr

juherr commented Mar 10, 2019

Copy link
Copy Markdown
Member

@krmahadevan Do you confirm the issue?

@krmahadevan

Copy link
Copy Markdown
Member

@juherr I haven't got to this yet. I will get to this shortly. Since this is in the graph section, I would again need to brush up on its working :)

@jobayle

jobayle commented Mar 11, 2019

Copy link
Copy Markdown
Author

Thanks for the test case but it doesn't follow the current convention.

Where can I read about this convention?

I am not sure if the test that you added is running as a group but it may be running as a standalone test. You would need to create a test that extends test.SimpleBaseTest and within an @test method you would need to create a suite object add the group filtering, instantiate the TestNG object and then run the tests with it.

Me neither, also I tried to follow your instructions but eventually failed as I could not get it to work, sorry.

@juherr

juherr commented Mar 11, 2019

Copy link
Copy Markdown
Member

@jobayle You can check a recent package test like https://github.com/cbeust/testng/tree/master/src/test/java/test/name
You'll find a *Test which runs *Sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature: before/after @BeforeX / @AfterX configuration methods Feature: dependsOn dependsOnMethods / dependsOnGroups ordering Feature: groups Test groups (include/exclude)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants