serenity-bdd / serenity-cucumber6

Other
11 stars 23 forks source link

Multiple issues with Serenity #27

Open qatestingravi opened 3 years ago

qatestingravi commented 3 years ago

Pull the project from below github url https://gitlab.com/alltempprojects/tempuiwebjvjunitcucumberserenityv3-defaultdriver.git

Issue1. How to prevent the multi level logs in serenity reports? logs are displaying two times, I want to log only one error log. see the snapshot for reference in (reports>serenity-reports folder). Ex: Test is failed at 'Sendkeys' method in 'SeleniumLib' class. Note:'Sendkeys' is overloaded method in 'SeleniumLib' class. command used to run chrome: mvn verify -Drunner=TestRunnerForWeb -Denvironment=cr serenity duplicate logs

Issue2. What it the serenity property for running edge in headless?

Issue3. How to use dynamic property in 'serenity.conf' file. Ex: path for 'appium.app' property is need to use dynamically when running in jenkins. Tests are running fine in local, but failing in jenkins due to absolute path for 'appium.app' property in 'serenity.conf' file

Issue4. I want to start/stop the appium server before/after running the android tests. for that I have created BeforeClass, AfterClass methods in TestRunnerForMobile.java runner class. Ran the 'TestRunnerForMobile' runner class. But getting null value for 'webdriver.driver' property at line 24 in 'TestRunnerForMobile' class. How to get 'webdriver.driver' property in runner class? Note: Need to run 'TestRunnerForMobile' runner class ++++++++++ below is code for 'TestRunnerForMobile' runner class ++++++++++++ @RunWith(CucumberWithSerenity.class) @CucumberOptions( plugin = {"pretty" }, features = "src/test/resources/features/Addition.feature", glue = {"stepdefinitions", "common"} ) public class TestRunnerForMobile { static EnvironmentVariables environmentVariables;

@BeforeClass
public static void beforeClass() {
    try {
        String value = EnvironmentSpecificConfiguration.from(environmentVariables).getProperty("webdriver.driver");
        if (value.equalsIgnoreCase("appimum")) {
            System.out.println("Appium server Started");
        }
    } catch (Exception e) {
    }
}

@AfterClass
public static void afterClass() {
    try {
        String value = EnvironmentSpecificConfiguration.from(environmentVariables).getProperty("webdriver.driver");
        if (value.equalsIgnoreCase("appimum")) {
            System.out.println("Appium server stopped");
        }
    } catch (Exception e) {
    }
}

}

+++++++++++

qatestingravi commented 3 years ago

@wakaleo can you please guide for the above issues?

wakaleo commented 3 years ago

This looks pretty project-specific issues, would you like to talk about our commercial support options?

qatestingravi commented 3 years ago

@wakaleo Thanks for the reply, actually these are not project specific issues, they are generic issues. its not commercial project. I am just learning it. Earlier I do have experience with cucumber, so, just trying to implement the same in serenity. it will help me if you can provide some generic answers which can be possible of any above issues.