Application Motion Commands

Use and application of the eValid server loading (LoadTest) capability. And in the cloud computing context for monitoring and loading.

Application Motion Commands

Postby swtesting » Wed Jun 04, 2008 10:04 am

Ok here comes the code with some more detailed comments :), also
attaching an application image-

Before the code i will explain what am i doing:

1.- I insert a new record some fields, the last field i fill is the
comment field

2.- After that i submit the form and the application add a new record to
a list, this record is always the firstone on top of the list, so is
always de source index, this new record has all the information i
captured (included the comment) and also comes with an extra field wich
is a secuencial number (lets call it order number)

3.- I validate that the comment was successfully inserted

4.- Having that i also want to save the order number to keep record of
what order numbers i created

5.- After saving the number sing out from app.

The code goes as follows (everything is working except that the order
number is getting saved without any space or new line on each
interation)

InputValue 0 53 "TEXT" "iptComment" "comment" $Comentario "" ""
Code: Select all
#The line above insert the $Comentario variable of my data table this is working fine
SubmitClick 0 124 "" "" "Procesar" ""
#We click the submit button

# HERE GOES A SYNC POINT INSTEAD OF WAIT, actually not having problems
# with sync, already know that, the pages does not take more than 500
# milisecs to load, just writing a note for future references  :)
Wait 1000
ValidateSelectedText 0 139 0 $Comentario ""

# the submit button shows me a list of the comments i have submited, so
# the first record must be the variable $Comentario i just submitted, no
# problems here also
SaveSelectedText 0 "LotesGenerados.txt" 126 0 10 "" APPEND

# this line save the order number that generates with the last
# $Comentario submited
Wait 500

#FollowLink 0 48 "Salir" "http://192.168.200.6/logout.aspx
   <https://mail.xxxxxxzons.com.mx/exchweb/bin/redir.asp?
   URL.168.200.6/logout.aspx" ""

# End of the script.
swtesting
 
Posts: 35
Joined: Thu May 29, 2008 3:51 pm

Re: Application Motion Commands

Postby serverloading » Wed Jun 04, 2008 10:06 am

My apologies, I know you are very close to the application but
to be honest this is too sketchy. We need to talk or WebEX
or both to confirm this. I say this because I'm going to
suggest things that I don't know are correct or not. My worry
is you will blame me or eValid for a failure...

It seems to me that you want to create a script that can be
called with a set of $PARAMETERS that works in this way
(pseudocode below).

-----------------------------------------------------------------
...in the actual script:

CallScript mytest.evs $FIELD1=value $FIELD2=value...

-----------------------------------------------------------------
mytest.evs:

* Make sure the page you are working with is alive, with
some kind of sync operation.

* Type in $FIELD1, $FIELD2, $FIELD3.

* Type in $COMMENT.

* Click submit (SubmitClick) the form and that causes some report to
be updated.

* Wait until the report is actually available, which may require
some kind of synchronization command. You may need to sync on
some object property in the page being delivered.

* The application has added $COMMENT to the report, and it is
known to occur at the top of some list.

* Use an IndexFindElement command to locate innerText = $COMMENT,
to establish a value of sourceIndex where the innerText matches
the content required. This only succeeds if $COMMENT really
is there...so you may not need the next step...

* Use an IndexValidateObjectProperty to confirm that
sourceIndex = $COMMENT to confirm that what you found there is there.

* ((You did not say where the order number is, but I assume it
is in the report where $COMMENT is..))

* Use an IndexFindElement command to locate the sourceIndex
of the order number in the report page. You may need to
use the PageMap to find the actual name you want to be
searching for on this report.

* Use an IndexSaveObjectProperty to write the value of the particular
property onto the file (so you have a record of the order number).

* Do the formating fixups so your output file is the way you want it.

-----------------------------------------------------------------

Reference:

eValid has special commands to allow manipulation and motion
inside a web page, to capture certain special kinds of effects:

http://www.e-Valid.com/Products/Documen ... ation.html

Hope that this helps...
eValid Tech Support Team
serverloading
 
Posts: 86
Joined: Tue Jan 01, 2008 12:48 pm


Return to Performance/Load Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons