PMC:QA:Sahi with ZK Webui POC

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

The related documents(Maybe you need to review them first):


Recorded Sahi script

Record Sahi script via Sahi Controller.

Example:test Adempiere login,http://adservername:port/webui/

start Sahi

start Sahi,then open localhost:9999,put in your url(http://adservername:port/webui/)


Record script

record test script by Sahi controller,put in Script Name,and select "Record" button to start recording.

adlogin_test.sah ans scripts in it:

_setValue(_textbox(0), "SuperUser");
_setValue(_password(0), "System");
_click(_image("Ok24.png"));

the above scripts:

  • first put in User ID "SuperUser"
  • second put in password "System"
  • last click "ok" button.

Adsa2.png

or you can write sahi script by yourself.

how to?please refer to:

test ad via hudson

start hudson

start Xvfb

bin # /etc/init.d/xvfb start
Starting virtual X frame buffer: Xvfb.

update suite and ant script

update suite

scripts # nano my.suite

the content:

adlogin_test.sah

update ant script

modify baseurl as what you want to test. here is adempiere webui address.

 <property name="urlbase" value="http://adservername:port/webui/"/>

build

but has problem:

the result:

Adsa1.png

these scripts,tested them by Sahi controller is Ok,but by commandline or hudson test is failed.

Adsa3.png

solution:

i change the last step script as:

_click(_image(2), "Ok24.png");

_image(2),express "Ok24.png" is the 3th image on the page,now can find this image.

Adsa4.png

this solution is not very good,because we don't konw the parameters's number generally.

Links