GithubHelp home page GithubHelp logo

frameworkium / frameworkium-bdd Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 19.0 1.14 MB

Integration of Cucumber BDD and frameworkium-core to offer support for using tests written as feature files.

License: Apache License 2.0

Java 92.40% Gherkin 7.60%
automation bdd cucumber-jvm selenium selenium-webdriver

frameworkium-bdd's Issues

Error writing allure properties file

Hi just pulled down the frameworkium-bdd repo. I get the following exception on test run seems it is unable to find properties in the target directory?

[INFO] Running TestSuite
18:06:32.677 [TestNG-test=Surefire test-1] ERROR - IO problem when writing allure properties file
java.io.FileNotFoundException: target/allure-results/environment.properties (No such file or directory)
at java.io.FileOutputStream.open0(Native Method) ~[?:?]
at java.io.FileOutputStream.open(FileOutputStream.java:298) ~[?:?]
at java.io.FileOutputStream.(FileOutputStream.java:237) ~[?:?]
at java.io.FileOutputStream.(FileOutputStream.java:126) ~[?:?]
at com.frameworkium.core.common.reporting.allure.AllureProperties.save(AllureProperties.java:82) [frameworkium-core-3.0.0.jar:?]
at com.frameworkium.core.common.reporting.allure.AllureProperties.createUI(AllureProperties.java:32) [frameworkium-core-3.0.0.jar:?]
at com.frameworkium.core.ui.UITestLifecycle.afterTestSuite(UITestLifecycle.java:114) [frameworkium-core-3.0.0.jar:?]
at com.frameworkium.bdd.UITestRunner.tearDownClass(UITestRunner.java:85) [test-classes/:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) [testng-6.14.3.jar:?]
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59) [testng-6.14.3.jar:?]
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458) [testng-6.14.3.jar:?]
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222) [testng-6.14.3.jar:?]
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142) [testng-6.14.3.jar:?]
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:214) [testng-6.14.3.jar:?]
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) [testng-6.14.3.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

The Allure report creates both a default suite and a feature suite

Describe the Issue
When the feature BDD suite is generated, a default suite called Surefire Suite is also created. This is counted as an extra test in the execution, even though only one test is actually run. This causes a discrepancy in the test results.
To Reproduce
Steps to reproduce the behavior:

  1. Execute the test with the maven command,mvn clean verify -Dbrowser=chrome"
  2. On successful execution execute maven report command mvn allure: report. Report generated successfully

Expected Behaviour
A clear and concise report should be generated with only the feature file suite displayed in the report.

Screenshots

image

Versions (please complete the following information):

  • Frameworkium-core version: [4.0.0-BETA4]
  • OS: [e.g. Windows 10]
  • Browser [e.g. Chrome]
  • Version [e.g. 116]

Additional Context
Add any other context about the problem here.

How do I specify the path of the chrome or the IE driver inorder to debug a single feature file

Hi Team,

Thanks for the excellent framework.

I am trying to use this BDD framework and run/debug a particular feature file using Chrome or the IE driver but I am unable to make out exactly as to where do I mention the path of the driver.exe files for chrome or IE. Below is what I am trying to achieve. Any help would be appreciated.

String chromedriver_path = System.getProperty("user.dir") + "/drivers/chromedriver.exe";
System.setProperty("webdriver.chrome.driver",chromedriver_path);

Should the UITestRunner have alwaysRun set on afterMethod?

I've found that if an exception is thrown in the setUpClass or setTestName methods (annotated with @BeforeClass and @BeforeMethod respectively) of UITestRunner, then the subsequent test(s) are skipped, and so the afterMethod method doesn't execute. This meant that the Chrome session didn't get killed.

Adding alwaysRun=true to the @AfterMethod annotation seems to have resolved this issue.

Is there any downside to that which I might be missing? If not, I'm happy to submit a PR with that change in.

retry is not working for BDD examples

I have added @Test(retryAnalyzer = RetryFlakyTest.class) to the test class and then run the seleniumHq bdd example (forcing it to fail) mvn clean verify -Dtags=@CustomTag -DmaxRetryCount=2

After the test fails, the test is not executed again. Is the retry feature working for BDD implementation?

[Question] Calling methods from the same page

   @Step
    @Given("^I have opened Admin Ui login page$")
    public void givenIHaveLogedToAdminUi() throws InterruptedException {
        LoginPage.open();
    }

    @Given("^User logged to Admin Ui as a \"([^\"]*)\" and \"([^\"]*)\"$")
    public void whenImLoginIntoAdminUiAsATypeAnd(String username, String password) throws InterruptedException {
        new LoginPage().get().fillLoginForm(username, password);
        new LoginPage().get().login();
        new DashboardPage().get().getMainMenu();
    }

    @Then("^I click submit button with empty credential$")
    public void thenIClickSubmitButtonWithEmptyCredential() throws InterruptedException {
        new LoginPage().get().loginWithWrongCred();
    }

    @Then("^I should see Invalid Username or Password message$")
    public void thenIShouldSeeInvalidUsernameOrPassword() throws InterruptedException {
        Assert.assertTrue(new LoginPage().get().getInvalidUsernameAndPasswordError());
    }

I have Following code and my question is should i always call (new LoginPage().get().SOME_METHOD or create an LoginPage object and reuse it in other methods?
New keyword should be rather for creating instance of page ?

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.