You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Hans Bakker (JIRA)" <ji...@apache.org> on 2018/08/01 03:09:00 UTC

[jira] [Updated] (OFBIZ-6618) Selenium test integration using XML files

     [ https://issues.apache.org/jira/browse/OFBIZ-6618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Bakker updated OFBIZ-6618:
-------------------------------
    Description: 
Added a new type of test, for testing with Selenium WebDriver, but without writing any Java code. This will help making GUI tests quicker and easier to create. Test steps and instances are defined in XML files, like example below, which tests the login procedure for the admin user.
{code:java}
<testcase name="adminLogin">
  <step function="openBrowser"/>
  <step function="navigate" datavalue="https://localhost:8443/example/control/checkLogin/main"/>
  <step function="writeInput" by="name" webobject="USERNAME" dataname="username"/>
  <step function="writeInput" by="name" webobject="PASSWORD" dataname="password"/>
  <step function="click" by="cssSelector" webobject="input[type=&quot;submit&quot;]"/>
  <step function="checkExists" by="linkText" datavalue="Logout"/>
  <step function="pause" datavalue="2"/>
  <step function="closeBrowser"/>
  
  <testinstance>
    <data name="username" value="admin"/>
    <data name="password" value="ofbiz"/>
  </testinstance>
</testcase>
{code}
Git repository with example (put in 'hot-deploy' folder and check README.txt file):
{code:java}
git clone http://antwebsystems.com/gerrit/growerptest
{code}

  was:
Added a new type of test, for testing with Selenium WebDriver, but without writing any Java code. This will help making GUI tests quicker and easier to create. Test steps and instances are defined in XML files, like example below, which tests the login procedure for the admin user.
{code}
<testcase name="adminLogin">
  <step function="openBrowser"/>
  <step function="navigate" datavalue="https://localhost:8443/example/control/checkLogin/main"/>
  <step function="writeInput" by="name" webobject="USERNAME" dataname="username"/>
  <step function="writeInput" by="name" webobject="PASSWORD" dataname="password"/>
  <step function="click" by="cssSelector" webobject="input[type=&quot;submit&quot;]"/>
  <step function="checkExists" by="linkText" datavalue="Logout"/>
  <step function="pause" datavalue="2"/>
  <step function="closeBrowser"/>
  
  <testinstance>
    <data name="username" value="admin"/>
    <data name="password" value="ofbiz"/>
  </testinstance>
</testcase>
{code}
Git repository with example (put in 'hot-deploy' folder and check README.txt file):
{code}
git clone https://gerrit.antwebsystems.com/growerptest
{code}


> Selenium test integration using XML files
> -----------------------------------------
>
>                 Key: OFBIZ-6618
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6618
>             Project: OFBiz
>          Issue Type: Test
>          Components: framework
>            Reporter: Ruud Griepsma
>            Assignee: Hans Bakker
>            Priority: Minor
>              Labels: selenium, test, webdriver
>             Fix For: Trunk
>
>         Attachments: ModelTestSuite.patch, build.patch, test-suite.patch
>
>
> Added a new type of test, for testing with Selenium WebDriver, but without writing any Java code. This will help making GUI tests quicker and easier to create. Test steps and instances are defined in XML files, like example below, which tests the login procedure for the admin user.
> {code:java}
> <testcase name="adminLogin">
>   <step function="openBrowser"/>
>   <step function="navigate" datavalue="https://localhost:8443/example/control/checkLogin/main"/>
>   <step function="writeInput" by="name" webobject="USERNAME" dataname="username"/>
>   <step function="writeInput" by="name" webobject="PASSWORD" dataname="password"/>
>   <step function="click" by="cssSelector" webobject="input[type=&quot;submit&quot;]"/>
>   <step function="checkExists" by="linkText" datavalue="Logout"/>
>   <step function="pause" datavalue="2"/>
>   <step function="closeBrowser"/>
>   
>   <testinstance>
>     <data name="username" value="admin"/>
>     <data name="password" value="ofbiz"/>
>   </testinstance>
> </testcase>
> {code}
> Git repository with example (put in 'hot-deploy' folder and check README.txt file):
> {code:java}
> git clone http://antwebsystems.com/gerrit/growerptest
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)