Closed themosaeed closed 1 month ago
@themosaeed i think you initiate driver in before method , this method must have same group name in order to be initiated before your test method
@zanoon2020 this works but nor it dosent read the data in the @beforeclass because it needs to have the same group. what if I need to have multiple groups ? i have only 1 before method in basetest class and 1 before class per class to grap all the needed data for all tests in the class that might have different groups
@themosaeed groups can have multiple values , for your base test class it must have all group names you specify in order to be run before your test class @beforeClass(groups ={"smoke", "regression"})
@themosaeed i have something in mind , please set alwaysRun = true in your base test and run again without adding group to test base
@BeforeClass(alwaysRun=true)
alwaysRun = true works perfectly but have to be put on the before method in base class and befroeclass in the test class. and also after method if you have
thank you @zanoon2020 for the help
Describe the bug
when I try to assign testing groups to some test cases and try to run this group using the command mvn test -Dgroups={group name} execution failed with the following error Cannot invoke "com.shaft.driver.SHAFT$GUI$WebDriver.assertThat()" because "this.driver" is null
Link to SHAFT_Engine Console logs
https://gist.github.com/themosaeed/de36ab0c21bc198e7fe65b5d9053de61
Link to SHAFT_Engine Extent Report HTML
(https://gist.github.com/themosaeed/b906e17e3f8ef1011c0c257e30879930
Environment
To Reproduce
Steps to reproduce the behavior: assign a group to any test case @Test(groups = { "trail" }) try to run the test case using the following command mvn test -Dgroups=trail
Expected behavior
to run the specific test or tests assigned to this group