wttech / bobcat Goto Github PK
View Code? Open in Web Editor NEWBobcat is an automated testing framework for functional testing of web applications.
Home Page: https://cognifide.github.io/bobcat/
License: Apache License 2.0
Bobcat is an automated testing framework for functional testing of web applications.
Home Page: https://cognifide.github.io/bobcat/
License: Apache License 2.0
In Getting Started section, provide a developer setup guide: what version of JDK, Maven etc. should be installed.
see COGBB-636
Currently we have AbstractPage
class which is applicable for Author instance and PublishPage
which is applicable for Publish instance. Current naming convention is misleading, as in this approach AbstractPage
should be renamed to AuthorPage
. Maybe it would be good to introduce top-level AbstractPage
class from which PublishPage
and AuthorPage
classes would inherit?
Implementation of this issue enables to configure AEM TouchUI components field by field. There is no need to configure whole component from static, yaml-based configuration.
Example of Aem richtext component configuration using single dialog fields :
@Test
public void shouldRenderBoldedText() {
//Assuming page is prepared earlier
page.getParsys(parsys)
.getComponent(COMPONENT_NAME)
.openDialog()
.setField("", FieldType.RICHTEXT.name(), "test test test")
.setField("", FieldType.RICHTEXT_FONT_FORMAT.name(), "BOLD")
.confirm();
//Assertions here
}
We want to investigate and create some poc of possible library dedicated for testing.
Sometimes when WebDriver scrolls the page, a gray panel is appearing on the bottom. I'm assuming that this is a JS console that is used to scroll the window by some script
implement siteadmin functionality for both AEM 6.1 and AEM 6.2
Rat plugin should be introduced to check wheter all sensitive files like java classes contain license header - http://creadur.apache.org/rat/apache-rat-plugin/
Error messages should be more meaningful
We need a mechanism for re-run failed Junit tests.
We found some issue with RerunFailedTests feature. When all tests pass, RerunFailedTests throws "No tests were executed!" exception. We should check before starting RerunFailedTests, if failedTests.properties contains scenarios, and trigger RerunFailedTests only if they exist.
We should extend gitignore file to contain:
Components listed below can be included to AEM6.2 integration touch ui suite.
AemTitleTest.class,
AemImageTest.class,
AemCarouselTest.class,
AemCreditCardTest.class
We should check how many test failed and upon this value decide if RerunFailedTests should trigger or not.
We decided that if less or equal than 10% of tests will fail, RerunFailedTests will start, and if more it will fail.
As for now the Map<String,List<FieldConfig>>
is used for describing component configuration. We should wrap it with some object and provide convenient methods for using it
When dialog for component contains multiple rich text fields, switching to them, doesn't work as expected. The frame is being switched properly, but when sending keys using Actions without web element context the active element is not taken into account. This is most probably Selenium issue.
Selenium provides: https://github.com/SeleniumHQ/selenium/wiki/LoadableComponent
We could have something like this in Bobcat - examples:
@PageObject
public HomePage {
@LoadableComponent(css = "")
private WebElement necessaryComponent;
}
@PageObject
public HomePage {
@LoadableComponent(css = "", behavior = "visibility", timeout = "10" )
private WebElement necessaryComponent;
}
@LoadableComponent(behavior = "condition")
public HomePage {
}
@PageObject
public HomePage {
@LoadableComponent(behavior = "visibility", timeout = "10" )
private Login login;
}
@PageObject(css='.className')
public class Login() {
}
``
Create APIdocs for version 1.0.0
update link to docs in README.md
The following tests are failing:
After changes in AbstractPage, AuthorPage etc. our aem archetypes: junit and bdd stopped work. They need to be fixed before release with bobcat 1.0.0
Minor css selector fixes for bobcumber's support of AEM 6.2.
We would like to support fluent-selenium inside bobcat: https://github.com/SeleniumHQ/fluent-selenium
There are some classes which need to contain currentScope web element which is visible as not used (like AemPathWindow
). In order to make it more readable to the end user we should create such field internally for each class annotated with @PageObject
annotation. In situation when someone would want to have control over this field it could be defined manually, then the modified @PageObject
annotation should have no effect on this.
We can take a look at the Lombok (www.projectlombok.org) annotations implementation while working on this as it should be helpful.
Implementation of helpers for DAM and Workflows to support more Author operations.
Since TouchUI module is being integrated to Bobcat, please move ScenarioContext from AemClassic to some independent part. It is pure Cucumber functionality and shouldn't be part of Aem module.
Currently it is located: /bobcat/bb-aem-classic/src/main/java/com/cognifide/qa/bb/aem/dialog/configurer/ScenarioContext.java
com.cognifide.qa.bb.logging.Logger is not avaible (https://github.com/Cognifide/bobcat/wiki/Reporting)
We would like to have ability to put some tests to quarantine. When such test fails, the exception / message should be visible, but it should not alter the overall result of the build. The entire mechanism should be controlled through Report HTML view (adding, removing from quarantine etc.)
Introduce a new way of handling pages by Bobcat - a Page
utility in favor of sub-classing PublishPage
and AuthorPage
.
At the moment, in Bobcat we have abstract classes like AuthorPage or PublishPage that provide WebDriver instance for navigation properties and contain properties for domains.
The current approach with managing different pages is to subclass these types of pages, inject or simply hardcode the path and add additional fields, like specific page objects. These last items are usually driven by tests itself, they are not necessarily related to the page structure, e.g.:
In the end we're having multiple, redundant page objects being nothing else than wrappers for properties in specific use cases (as can be seen e.g. here: https://github.com/Cognifide/bobcat/blob/cb894457e92d3d02dbf146f682f35f1e52dc332a/bb-aem-integration-tests/src/main/java/com/cognifide/bdd/demo/po/product/CirclePage.java). Having such implementations indicates that we are recommending/suggesting this solution - while different projects have shown it is not being the most effective way of handling pages.
Additional few things worth considering / areas not addressed with the above approach:
Based on the above, Bobcat does not provide a clear guidance on how to approach page handling.
In favor of abstract classes, we could provide an extendable utility that would handle navigation and obtaining content.
Base assumptions:
// based on path
Page.on(PUBLISH).path("/content/test/node").open();
// based on config, e.g pages.yml:
// Test page:
// - path: /content/test/page
Page.on(AUTHOR).named("Test page").open();
// with query string
Page.on(PUBLISH).path("tested page").query().open();
// custom env
Page.on("192.168.1.2:6103").path("/content/test/node").open();
// handling protocols
Page.protocol(HTTPS).on(PUBLISH).path("/content/test/node").open();
// setting defaults
Page.default().protocol(HTTPS);
Page.default().protocol(HTTP).on(PUBLISH);
// EDIT mode - default
Page.on(AUTHOR).path("/content/test/node").open();
// WCM Mode disabled
Page.on(AUTHOR).mode(WCM_MODE_DISABLED).path("/content/test/node").open();
// Remembering the context
Page.on(AUTHOR).path("/content/test/node").open(); //saves as current page
// ... operations on page objects causing a redirect ...
Page.lastPage().open();
// Following redirect
WebElement a = driver.findElement(By.cssLocator("a.my-link"));
Page.navigateBy(a -> a.click()).expecting().path("/content/redirected/path"); // handles `page loading, change of URL etc.
// Verifying redirects
Page.wasRedirected().path("/path/to/potential/redirect");
// Obtaining parsys/component in authoring
// assuming navigation to an author page happened
// e.g. Page.on(AUTHOR).named("Test page").open();
// based on config, e.g pages.yml:
// Test page:
// - path: /content/test/page
// - parsys: /par
Page.current().get().parsys().component(Title.class);
// based on data-path (Touch UI)
Page.current().get().parsys("/data-path").component(Title.class);
// get 1st, last, nTh component from parsys
Page.current().get().parsys().first().component(Title.class) ;
Page.current().get().parsys().last().component(Title.class, 2) ;
Page.current().get().parsys().nth().component(Title.class, 2) ;
// obtaining scoped page objects
Page.current().get().pageobject(Section.class); // default scoping or based on PageObject(locator)
By locator = By.cssLocator(".my-scoped-element");
Page.current().get().scoped(locator).pageobject(Some.class);
WebElement myScope = driver.findElement(locator);
Page.current().get().scoped(myScope).pageobject(Another.class);
Incorrect path in AemPathFieldTest
Operations like:
There is a problem with revealing a subreport form report. When clicking on "+" sign console error shows "togglePart is undefined". It looks like this method is not implemented at all. We need to implement it and investigate the json structure of subreport as for now it is not very handy.
Currently we are using https://github.com/jenkinsci/cucumber-reports-plugin as reporting engine. It's fine, but has one disadvantage: works only with jenkins CI. We would like to have a reporting engine which is CI independent. Research: https://github.com/damianszczepanik/cucumber-reporting.
Exception: class java.lang.AssertionError
Message: Wrong image path Expected: a string ending with "cover" but: was "/content/dam/geometrixx-gov/cover.jpg"
org.hamcrest.MatcherAssert.assertThat () 20
org.junit.Assert.assertThat () 956
com.cognifide.bdd.demo.aem.touchui.AemImageTest.configureImageConfiguredBySingleFieldsTest () 120
sun.reflect.NativeMethodAccessorImpl.invoke0 () -2
sun.reflect.NativeMethodAccessorImpl.invoke () 62
sun.reflect.DelegatingMethodAccessorImpl.invoke () 43
java.lang.reflect.Method.invoke () 498
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall () 50
org.junit.internal.runners.model.ReflectiveCallable.run () 12
org.junit.runners.model.FrameworkMethod.invokeExplosively () 47
org.junit.internal.runners.statements.InvokeMethod.evaluate () 17
org.junit.internal.runners.statements.RunBefores.evaluate () 26
org.junit.rules.TestWatcher$1.evaluate () 55
org.junit.rules.ExternalResource$1.evaluate () 48
org.junit.rules.RunRules.evaluate () 20
com.cognifide.qa.bb.junit.TestRunner.runMethod () 167
com.cognifide.qa.bb.junit.TestRunner.runChild () 127
com.cognifide.qa.bb.junit.TestRunner.runChild () 61
org.junit.runners.ParentRunner$3.run () 290
org.junit.runners.ParentRunner$1.schedule () 71
org.junit.runners.ParentRunner.runChildren () 288
org.junit.runners.ParentRunner.access$000 () 58
org.junit.runners.ParentRunner$2.evaluate () 268
org.junit.runners.ParentRunner.run () 363
com.cognifide.qa.bb.junit.TestRunner.run () 140
org.junit.runners.Suite.runChild () 128
org.junit.runners.Suite.runChild () 27
org.junit.runners.ParentRunner$3.run () 290
java.util.concurrent.Executors$RunnableAdapter.call () 511
java.util.concurrent.FutureTask.run () 266
java.util.concurrent.Executors$RunnableAdapter.call () 511
java.util.concurrent.FutureTask.run () 266
java.util.concurrent.ThreadPoolExecutor.runWorker () 1,142
java.util.concurrent.ThreadPoolExecutor$Worker.run () 617
java.lang.Thread.run () 745
PageObjectSelectorListProxyProvider tries to find element too early which causes GuiceProvisionError
Each of our license header contain "Bobcat Parent" name. Should it be like that? Wouldn't it be better with just "Bobcat"?
So far it is only possible to add WebDriver proxy cookie when running tests remotely, please add that capability for other WebDriver Types.
hint: WebDriverType.java
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.