paypal / selion Goto Github PK
View Code? Open in Web Editor NEWEnabling Test Automation in Java
Home Page: http://selion.io
License: Apache License 2.0
Enabling Test Automation in Java
Home Page: http://selion.io
License: Apache License 2.0
Started with getting-started for mobile automation in below link . came across below documentation issues
http://paypal.github.io/SeLion/html/documentation.html#getting-started-mobile
Found out that maven-surefire-plugin : 2.12 version which is updated the above Selion link is having the issue to run the script .
Got error "Error occurred in starting fork” when I am running the script with maven-surefire-plugin : 2.12 due to the bug in (https://jira.codehaus.org/browse/SUREFIRE-870) In maven-surefire-plugin .
After I changed the version to 2.17 , I am not getting that error .
If RuntimeReporter used json output, there would b opportunity for greater flexibility w.r.t the look/feel of the report.
The documentation on http://paypal.github.io/SeLion/html/documentation.html#buildingSelion does not list chromedriver and chrome as a prerequisite.
While technically, this is accurate if you do mvn -DskipTests=true
or run a test suite other than the default one with mvn -DsuiteXmlFile=<a suite file in src/test/resources/suites>
, it does not work per the instructions provided which will run the default test (requires Chrome - either locally or on a remote SELION_SELENIUM_HOST)
Please create a User Guide which explais architecture of SeLion & execution flow
Feedback from - https://groups.google.com/forum/#!topic/selion/5pJvz9p80cs
The data about start time, end time for each test is present in the report.json. Need this to be displayed on the rendered HTML report.
With the recent changes to SimpleLogger
(which is used by SeLionLogger
) 003b480 we have an opportunity to add a new configuration option that will control the log file limits. For example, we can now limit the number of log files and/or the size before rolling to a new file. We should define a default behavior, add it to our SeLionLoggerSettings
, and give the user the ability to override the default behavior.
We need to publish the source for the test app "Page Objects" (both ios and android version).
https://github.com/paypal/SeLion/tree/develop/client/src/test/resources/apps
We need to provide examples which document how to use Selendroid with @MobileTest
in SeLion. In addition we need to document any Selendriod configuration parameters.
There is still some lingering code in SeLion "client" using org.json. We need to move it to gson.
The jar files should have a copy of the LICENSE file in them.
ios-logging.properties installs a FileHandler on the root logger which outputs ALL events to ios-driver.log
This is a pretty invasive assumption for downstream applications such as SeLion.
If you have a syntax error in your PageYAML document, you could see the following error displayed by the code generator, which does not indicate a corrective action to take.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.paypal.selion:SeLion-Code-Generator:1.0.0-SNAPS
HOT:generate (default) on project Sample:
SeLion code generator failed when generating code for publisher.yaml
Root Cause :
java.lang.IllegalArgumentException: Missing or incorrect platform in Data file:C:\projects\selion-qa\Sample\src\main\resources\GUI
Data\publisher.yaml
To reproduce this, use the following PageYAML file which is missing the locale definition for the locator;
baseClass: "com.paypal.selion.testcomponents.BasicPageImpl"
pageTitle:
US: "API Page"
elements:
loginTextField:
locators:
"@id='txtUsername'"
defaultLocale: "US"
pageValidators: []
The error message displayed is misleading. It suggests that the user needs to specify 'platform'. However, by design 'platform' should default to 'web' and is only required if the PageYAML is not for 'web'. Instead it should simply say, "the document could not be parsed" or something similar.
Furthermore, if you run mvn --X generate-sources
you get the following, which is also not very helpful. It only slightly suggests a parsing error -- in a cryptic way. :)
[INFO] Generating java file for YAML file [publisher.yaml] in domain []
[DEBUG] Unable to process src\main\resources\GUIData\publisher.yaml as PageYaml V2.
null; Can't construct a java object for tag:yaml.org,2002:com.paypal.selion.plugins.Page; exception=Cannot crea
te property=elements for JavaBean=pageTitle: API Page
baseClass: com.paypal.selion.testcomponents.BasicPageImpl
elements: 0
pageValidators: 0
defaultLocale: US
; Cannot create property=locators for JavaBean=com.paypal.selion.plugins.GUIElement@502f1f4c; No single argument constru
ctor found for interface java.util.Map; in 'reader', line 1, column 1:
baseClass: "com.paypal.selion.te ...
^
[DEBUG] ++ Processing src\main\resources\GUIData\publisher.yaml as PageYaml V1
[DEBUG] Reading keys from data file [src\main\resources\GUIData\publisher.yaml]
[DEBUG] Specified platform in data file [src\main\resources\GUIData\publisher.yaml] : [null]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
Add an ability to specify sdk version and/or device variation via Webtest annotation when launching and ios-driver test
The <repositories>
section of the parent POM needs to be re-written to
<repositories>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>forge</id>
<url>http://repository.sonatype.org/content/groups/forge/</url>
</repository>
</repositories>
Long term the <repositories>
section of the parent POM should go away. However, it is in place for now due to the dependency on UserAgentUtils which is not in Central
https://maven.apache.org/guides/mini/guide-central-repository-upload.html
http://blog.sonatype.com/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/#.VAZDtmRdXNI
http://blog.sonatype.com/2010/03/why-external-repos-are-being-phased-out-of-central/#.VAZDuWRdXNI
This issue focusses on documenting the steps to host the SeLion-grid on different platform.
Provide meaningful description of the usage of files.
We would like to add support for custom elements in the CodeGenerator. We would like to handle webpages that are build with ExtJS and if you look at for example their drop down list. You will see that the default implementation is not going to work.
For us to be able to use our best practices for web automation we would like to have custom element in the CodeGenerator that can handle this kind of non default behavior.
Add a property to the Code-Generator which accepts a comma separated list of java classes. Based on the parameters we can add the imports and create getters and setters in the generated Pages. Example "com.rlux.test.elements.ExtJSSelectList,com.rlux.test.elements.ExtJSTable"
Output:
import com.rlux.test.elements.ExtJSSelectList;
private ExtJSSelectList categoryExtJSSelectList;
public ExtJSSelectList getCategoryExtJSSelectList() {
return categoryExtJSSelectList;
}
public void setCategoryExtJSSelectList(ExtJSSelectList categoryExtJSSelectList) {
this.categoryExtJSSelectList = categoryExtJSSelectList;
}
Any concerns for such functionality, and any feedback what to focus on if we would want to implement it?
Long term, the <repositories>
section of the parent POM should go away. However, it is in place for now due to the dependency on UserAgentUtils which is not in Central
https://maven.apache.org/guides/mini/guide-central-repository-upload.html
http://blog.sonatype.com/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/#.VAZDtmRdXNI
http://blog.sonatype.com/2010/03/why-external-repos-are-being-phased-out-of-central/#.VAZDuWRdXNI
PR #23 added ElementEventListeners to SeLion. We need to document this capability on the site.
Documentation should include;
Running TestSuite
10.20.2014 15:43:05.911,[1] com.paypal.selion INFO JDK Information: Java HotSpot(TM) 64-Bit Server VM from Oracle Corporation ver. 1.7.0_45
10.20.2014 15:43:05.916,[1] com.paypal.selion INFO Runtime Report : /Users/bbheemanadham/testProject/Sample/target/surefire-reports/RuntimeReporter/index.html
2014-10-20 15:43:06.465:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT
2014-10-20 15:43:06.496:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null}
2014-10-20 15:43:06.506:INFO:osjs.AbstractConnector:Started SocketConnector@localhost:4444
10.20.2014 15:43:06.506,[9] com.paypal.selion INFO Local Hub spawned
10.20.2014 15:43:07.105,[9] com.paypal.selion INFO Local node spawned
10.20.2014 15:43:07.240,[9] com.paypal.selion INFO Attached node to local hub http://localhost:4444/grid/register
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
ightweightThemeManager"]
1413837787990 addons.xpi DEBUG startup
1413837787990 addons.xpi DEBUG Skipping unavailable install location app-system-share
1413837787991 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/MacOS/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
1413837787991 addons.xpi INFO Mapping [email protected] to /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/[email protected]
1413837787991 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/webdriver-staging
1413837787992 addons.xpi DEBUG checkForChanges
1413837787998 addons.xpi DEBUG Directory state JSON differs: cache [] state [{"name":"app-global","addons":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"descriptor":"/Applications/Firefox.app/Contents/MacOS/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","mtime":1411702628000,"rdfTime":1411702627000}}},{"name":"app-profile","addons":{"[email protected]":{"descriptor":"/var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/[email protected]","mtime":1413837787000,"rdfTime":1413837787000}}}]
1413837788002 addons.xpi-utils DEBUG Opening XPI database /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions.json
1413837788003 addons.xpi DEBUG New add-on [email protected] installed in app-profile
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1413837788040 addons.xpi-utils DEBUG Make addon app-profile:[email protected] visible
1413837788041 DeferredSave.extensions.json DEBUG Save changes
1413837788041 DeferredSave.extensions.json DEBUG Save changes
1413837788041 addons.xpi DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1413837788043 addons.xpi-utils DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1413837788043 DeferredSave.extensions.json DEBUG Save changes
1413837788043 DeferredSave.extensions.json DEBUG Save changes
1413837788047 addons.xpi DEBUG Updating database with changes to installed add-ons
1413837788047 addons.xpi-utils DEBUG Updating add-on states
1413837788048 addons.xpi-utils DEBUG Writing add-ons list
1413837788266 DeferredSave.extensions.json DEBUG Starting timer
1413837788293 DeferredSave.extensions.json DEBUG Starting write
1413837788297 addons.manager DEBUG shutdown
1413837788299 addons.xpi DEBUG shutdown
1413837788299 addons.xpi-utils DEBUG shutdown
1413837788330 DeferredSave.extensions.json DEBUG Write succeeded
1413837788330 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 16
1413837788330 addons.xpi DEBUG Notifying XPI shutdown observers
1413837788332 addons.manager DEBUG Async provider shutdown done
1413837788532 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1413837788533 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1413837788534 addons.xpi DEBUG startup
1413837788535 addons.xpi DEBUG Skipping unavailable install location app-system-share
1413837788535 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/MacOS/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
1413837788536 addons.xpi INFO Mapping [email protected] to /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/[email protected]
1413837788536 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/webdriver-staging
1413837788536 addons.xpi DEBUG checkForChanges
1413837788541 addons.xpi DEBUG No changes found
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:103)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:62)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:56)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:216)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:203)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:170)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
An error occured while setting up the test environment.
Root cause: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
ightweightThemeManager"]
1413837787990 addons.xpi DEBUG startup
1413837787990 addons.xpi DEBUG Skipping unavailable install location app-system-share
1413837787991 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/MacOS/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
1413837787991 addons.xpi INFO Mapping [email protected] to /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/[email protected]
1413837787991 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/webdriver-staging
1413837787992 addons.xpi DEBUG checkForChanges
1413837787998 addons.xpi DEBUG Directory state JSON differs: cache [] state [{"name":"app-global","addons":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"descriptor":"/Applications/Firefox.app/Contents/MacOS/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","mtime":1411702628000,"rdfTime":1411702627000}}},{"name":"app-profile","addons":{"[email protected]":{"descriptor":"/var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/[email protected]","mtime":1413837787000,"rdfTime":1413837787000}}}]
1413837788002 addons.xpi-utils DEBUG Opening XPI database /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions.json
1413837788003 addons.xpi DEBUG New add-on [email protected] installed in app-profile
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1413837788040 addons.xpi-utils DEBUG Make addon app-profile:[email protected] visible
1413837788041 DeferredSave.extensions.json DEBUG Save changes
1413837788041 DeferredSave.extensions.json DEBUG Save changes
1413837788041 addons.xpi DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1413837788043 addons.xpi-utils DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1413837788043 DeferredSave.extensions.json DEBUG Save changes
1413837788043 DeferredSave.extensions.json DEBUG Save changes
1413837788047 addons.xpi DEBUG Updating database with changes to installed add-ons
1413837788047 addons.xpi-utils DEBUG Updating add-on states
1413837788048 addons.xpi-utils DEBUG Writing add-ons list
1413837788266 DeferredSave.extensions.json DEBUG Starting timer
1413837788293 DeferredSave.extensions.json DEBUG Starting write
1413837788297 addons.manager DEBUG shutdown
1413837788299 addons.xpi DEBUG shutdown
1413837788299 addons.xpi-utils DEBUG shutdown
1413837788330 DeferredSave.extensions.json DEBUG Write succeeded
1413837788330 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 16
1413837788330 addons.xpi DEBUG Notifying XPI shutdown observers
1413837788332 addons.manager DEBUG Async provider shutdown done
1413837788532 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1413837788533 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1413837788534 addons.xpi DEBUG startup
1413837788535 addons.xpi DEBUG Skipping unavailable install location app-system-share
1413837788535 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/MacOS/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
1413837788536 addons.xpi INFO Mapping [email protected] to /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/[email protected]
1413837788536 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /var/folders/yy/c70_0kdn7nz_p4ys8pxm_n3438x977/T/anonymous508798624517507211webdriver-profile/extensions/webdriver-staging
1413837788536 addons.xpi DEBUG checkForChanges
1413837788541 addons.xpi DEBUG No changes found
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
Command duration or timeout: 46.19 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'LM-AUN-00874562', ip: '127.0.0.1', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.7.0_45'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
10.20.2014 15:43:53.511,[9] com.paypal.selion INFO Please review the test report for the screenshot at the time of failure.
2014-10-20 15:43:53.571:INFO:osjsh.ContextHandler:stopped o.s.j.s.ServletContextHandler{/,null}
10.20.2014 15:43:53.623,[1] com.paypal.selion INFO Local hub has been stopped
10.20.2014 15:43:53.887,[1] com.paypal.selion INFO Local node has been stopped
10.20.2014 15:43:53.948,[1] com.paypal.selion INFO generating report /Users/bbheemanadham/testProject/Sample/target/surefire-reports/html/report.html
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 48.581 sec <<< FAILURE!
Results :
Failed tests: DemoTest1(com.mycompany.test.Demo): An error occured while setting up the test environment. (..)
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
Right now a user can host a Grid and node "only" on the same platform. If the grid is on linux then all nodes must be on linux. same goes for windows and mac. This should be enhanced to multiple platforms where a user can hook up linux/mac/windows node to a grid irrespective of platforms.
The ios-server jar is no longer a jar-with-dependencies. As a result, we have some classpath related issues when TestServerUtils attempts to start.
The fix here seems to be;
import org.seleniumhq.jetty7.x
in TestServerUtils.java
When you start a a Grid node or hub, SeLion's file downloader kicks in and verifies all files in download.properties
are present, and if necessary extracted.
By default, there are files downloaded which are not likely used on a unix/mac environment (IEDriver.exe, for example).
We should provide alternative download.properties
and a means for the user to select the correct one per their platform. In addition, we should document the behavior of file downloader w.r.t it's role and how one can make it work for them.
I tried following http://paypal.github.io/SeLion/html/documentation.html#buildingSelion to build SeLion.
But I was blocked for multiple times.
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SeLion Parent POM ................................. SUCCESS [1.919s]
[INFO] SeLion Project BOM ................................ SUCCESS [0.036s]
[INFO] SeLion Client ..................................... FAILURE [30.085s]
[INFO] SeLion Grid ....................................... SKIPPED
[INFO] SeLion Code Generator Maven Mojo .................. SKIPPED
[INFO] SeLion Archetype .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.326s
[INFO] Finished at: Mon Sep 15 16:07:48 CST 2014
[INFO] Final Memory: 32M/368M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project SeLion: Execution default-test of goal org.apa
che.maven.plugins:maven-surefire-plugin:2.17:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\Java\jdk1.7.0_40\jre\bin\java -XX:MaxPermSize=128m -XX:-UseSplitVerifier -jar D:\workspace\SeLion\client\target\surefire\s
urefirebooter3754694759072562222.jar D:\workspace\SeLion\client\target\surefire\surefire2098405363173608294tmp D:\workspace\SeLion\client\target\surefire\surefi
re_07125297575698861365tmp"
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :SeLion
So last, I skip test and got it built finally.
I made a change in README about how did I build it on Windows platform.
Here's a link of my commit: bingwei@2017062
I suggest to update SeLion build document on this part.
Issue reported via email.
SeLion does not allow for .yml files even though they too are YAML documents.
package
declaration -- it will end with a .
http://paypal.github.io/SeLion/ - The paypal open source svg is not displayed in newer IE versions..
The Getting Started page for both Web and Mobile automation basically just deals with a quick start archetype. Since SeLion has a customized archetype available which is also published to Maven Central, we would need to create/update our documentation such that we start referring to the SeLion archetype in our getting started documentation.
Consider rephrasing this text and/or adding an example which walk through the design details;
defaultLocale: - The default locale to use if the PageYAML does not explicitly define a locale specific
value. For example; A value of US will require US definitions in the PageYAML but if a test is currently
running against the German version of a site and the DE definition does not exist for the queried
attribute, then the US version will be used.
This documentation issue is rooted in this feedback;
I interpreted the phrase from documentation "if the PageYAML does not explicitly define a locale
specific value" as a possibility to drop "US:" key *in locator* and use just a value without prefix. I
thought that locators without a key will get the key from defaultLocale. Perhaps the doc should be
rephrased as "if locator does not define a locale", or maybe just replace it with example. English is not
good enough in situation like this one.
An example walk-through could look like this;
You only need to specify the locator for any given element in a different locale when it is different from the defaultLocale's value. When the test is run, if there is no locator specified for your target locale, the locator for the defaultLocale
is used. For example;
baseClass: "com.paypal.selion.testcomponents.BasicPageImpl"
pageTitle:
US: "API Page"
elements:
loginTextField:
locators:
US: "@id='txtUsername'"
helpPageButton:
locators:
US: "@id='helpPageBtn'"
UK: "@id='uk-helpPageBtn'"
defaultLocale: "US"
pageValidators: []
In this example, if you run a test with the locale = UK, the locators @id='uk-helpPageBtn'
and "@id='txtUsername'"
will be used for helpPageButton
and loginTextField
started with getting-started for web project . came across below documentation issues
http://paypal.github.io/SeLion/html/documentation.html#getting-started
The following location has zip files name "InternationalMountains" but in fact these are just dummy zip files. Because the application InternationalMountains is a real app, we need to rename these dummy zip files and update the tests.
https://github.com/paypal/SeLion/tree/develop/server/src/test/resources/artifacts/userOne
waitUntilElementIsXXX methods timeout if a piped element locator is passed
On the page http://paypal.github.io/SeLion/html/documentation.html#containers
The link SeLion Code generator Maven plugin
goes to whatIsCodeGenerator.html
instead of #what-is-code-generator
Please see the example below if I run this test case the simulator is still being launched with language=en and locale=en_US.
package com.symbio.test;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import org.testng.annotations.Test;
import com.paypal.selion.annotations.MobileTest;
import com.paypal.selion.platform.grid.Grid;
import com.paypal.selion.reports.runtime.MobileReporter;
public class IOS_Multi_Locale {
@MobileTest(appName = "InternationalMountains", language="fr", locale="fr_FR")
@Test
public void testMethod() throws InterruptedException {
MobileReporter.log("My Screenshot 1", true);
List cells = Grid.iOSDriver().findElements(By.className("UIATableCell"));
Assert.assertEquals(9, cells.size());
// get the 1st mountain
WebElement first = (WebElement) cells.get(0);
first.click();
Thread.sleep(10 * 1000);
// take a screenshot using the normal selenium api.
MobileReporter.log("My Screenshot 2", true);
// access the content
By selector = By.xpath("//UIAStaticText[contains(@name,'climbed')]");
WebElement text = Grid.iOSDriver().findElement(selector);
System.out.println(text.getAttribute("name"));
}
}
This seems to be an issue that popped up since selenium 2.41+
http://paypal.github.io/SeLion/html/documentation.html
The footer on this section of the site does not always stay on the bottom as it should.
When running the SeLion Grid on Mac it will download all the Windows drivers. Instead it should download the drivers specific to the platform that we are running on.
In case users didn't add asterisk in the browser parameter of the suiteXmlFile:
<parameter name="browser" value="chrome"/>
NPE will throw without indication:
Running TestSuite
02.25.2015 23:22:03.034,[1] com.paypal.selion INFO JDK Information: Java HotSpot(TM) 64-Bit Server VM from Oracle Corporation ver. 1.7.0_40
02.25.2015 23:22:03.037,[1] com.paypal.selion INFO Runtime Report : /.../surefire-reports/RuntimeReporter/index.html
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
02.25.2015 23:22:03.811,[14] com.paypal.selion INFO Local Hub spawned
02.25.2015 23:22:03.995,[14] com.paypal.selion INFO Local node spawned
02.25.2015 23:22:04.110,[14] com.paypal.selion INFO Attached node to local hub http://localhost:4444/grid/register
02.25.2015 23:22:04.120,[14] com.paypal.selion WARNING An exception occured after the test method invocation. Gobbling it as the test case itself did not fail
java.lang.NullPointerException
at com.paypal.selion.platform.grid.Grid.wrappedDriver(Grid.java:97)
at com.paypal.selion.reports.runtime.WebReporter.log(WebReporter.java:63)
at com.paypal.selion.platform.grid.WebTestSession.warnUserOfTestFailures(WebTestSession.java:437)
at com.paypal.selion.platform.grid.WebTestSession.closeCurrentSession(WebTestSession.java:410)
at com.paypal.selion.platform.grid.SeleniumGridListener.afterInvocation(SeleniumGridListener.java:262)
at org.testng.internal.invokers.InvokedMethodListenerInvoker$InvokeAfterInvocationWithoutContextStrategy.callMethod(InvokedMethodListenerInvoker.java:100)
at org.testng.internal.invokers.InvokedMethodListenerInvoker.invokeListener(InvokedMethodListenerInvoker.java:62)
at org.testng.internal.Invoker.runInvokedMethodListeners(Invoker.java:619)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:777)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
02.25.2015 23:22:04.206,[1] com.paypal.selion INFO Local hub has been stopped
02.25.2015 23:22:04.576,[1] com.paypal.selion INFO Local node has been stopped
02.25.2015 23:22:04.618,[1] com.paypal.selion INFO generating report .../surefire-reports/html/report.html
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.045 sec <<< FAILURE!
We should handle the exception to indicate the user mistakes.
https://github.paypal.com/pages/QualityInfrastructure/bluefin-oss-parent/html/documentation.html#excel-data-provider refers to an object called ExcelDataProvider
both in the write-up and the examples.
There is no such class in SeLion.
It is called SimpleExcelDataProvider
-- https://github.com/paypal/SeLion/blob/develop/client/src/main/java/com/paypal/selion/platform/dataprovider/SimpleExcelDataProvider.java
There are several examples where refer to MobileReporter
and WebReporter
in the SeLion docs. These classes no longer exist. They were consolidated into SeLionReporter
15:55:36.308 ERROR - java.io.IOException: Cannot run program "tasklist.exe /fo c
sv /nh": CreateProcess error=2, The system cannot find the file specified
com.paypal.selion.utils.process.ProcessHandlerException: java.io.IOException: Ca
nnot run program "tasklist.exe /fo csv /nh": CreateProcess error=2, The system c
annot find the file specified
There is a hard-coded assumption in the 'server' start-up script that the binaries will be a C:\Grid2. This assumption is not valid.
Look into options for getting https://github.com/paypal/SeLion/tree/gh-pages/html/java-docs updated in an automated fashion.
In addition, long term we will want to maintain multiple versions of the java-docs at that location. The versions will include previously released versions and current SNAPSHOTS
A Console to customize the choice of artifacts as per the user requirements would be useful.
There is no ability in the Auto Upgrade console page to select the nodes which the change should apply to. This means a user has to be creative if one node requires 32bit artifacts and another requires 64bit, for example.
By 'creative', it means the user is likely first shutting down the nodes the change should not apply to,
manual making the changes the download.json file, or other.
I was going through the getting started document of Selion.
http://paypal.github.io/SeLion/html/documentation.html#getting-started
In that, the mvn command to run the test suite is given as
just mvn clean test -DsuiteXmlFile=src/test/resources/SampleSuite.xml,
but that did not help me and it was throwing some error.
I had to add -DSELION_SELENIUM_RUN_LOCALLY=true, It would be great if you can update the document with that .
mvn clean test -DsuiteXmlFile=src/test/resources/SampleSuite.xml -DSELION_SELENIUM_RUN_LOCALLY=true.
I can find it described at different parts in the documentation, but not in getting started.
We need to clean up the directory in this area.
The page http://paypal.github.io/SeLion/html/documentation.html#pageyaml incorrectly conveys that each SeLion Element type strictly maps to a html element. We need to fix this.
Problematic text
The name to be given to identifying the locator/selector. This name would end up serving as the data member in the generated class and maps to the html element specified. The rules for naming locators/selectors are as follows:
<prefix>Button Is a Button html element.
<prefix>CheckBox Is a Check Box html element.
<prefix>DatePicker Is a Date Picker html element.
<prefix>Form Is a Form html element.
<prefix>Image Is a Image html element.
<prefix>Label Is a Label html element.
<prefix>Link Is a Link html element.
<prefix>RadioButton Is a Radio Button html element.
<prefix>List Is a Select List html element.
<prefix>Table Is a Table html element.
<prefix>TextField Is a Text Field html element.
<prefix>Container Is a Container html element.
More accurately, the following is true;
If you look at the code for all of the Element types unique to SeLion, none of them are strictly tied to a html element.
Rather, they each expose a set of properties or methods which one would expect to map to the html element that gives the class it's name. So, in the case of Label
, the class only adds the method isTextPresent()
. This means you can expect that if you pass any locator to an html element with inner text, you can map it to Label
in PageYAML and access the isTextPresent()
method in java code. You can use Label
for a div
, span
, p
nodes, for example, if you are looking to verify the text contained by them.
There is no feedback mechanism when the node is force restarted.
The UI immediately says auto restart successful when it is happening in the background.
The users must be notified about this. This is same when the auto upgrade is triggered.
com.paypal.selion.platform.grid.LocalSelendroidNode
the following methods are being duplicated from com.paypal.selion.platform.grid.LocalIOSNode
. Can we consider creating an AbstractNode
from which both LocalSelendroidNode
and LocalIOSNode
extend and house these two methods in the abstract class ?com.paypal.selion.platform.grid.LocalSelendroidNode.waitForNodeToComeUp(int)
com.paypal.selion.platform.grid.LocalSelendroidNode.wasNodeSpawned(int)
com.paypal.selion.platform.grid.LocalSelendroidNode.startSelendroidDriverNode(int)
can we consider using org.apache.commons.io.filefilter.FileFilterUtils
?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.