frameworkium / frameworkium-bdd Goto Github PK
View Code? Open in Web Editor NEWIntegration of Cucumber BDD and frameworkium-core to offer support for using tests written as feature files.
License: Apache License 2.0
Integration of Cucumber BDD and frameworkium-core to offer support for using tests written as feature files.
License: Apache License 2.0
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) [?:?]
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:
Expected Behaviour
A clear and concise report should be generated with only the feature file suite displayed in the report.
Screenshots
Versions (please complete the following information):
Additional Context
Add any other context about the problem here.
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);
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.
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?
@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 ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.