Current time: 09-21-2019, 06:53 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to test with a script?
07-05-2013, 01:19 PM
Post: #1
How to test with a script?
I'm doing a project where I need to execute some tests of the TodoMVC app (through the API). For now I'm just using the web interface, and I've tried a lot to execute the following scripted test:

logData 0
navigate http://todomvc.com/architecture-examples/backbone/
setValue id=new-todo Example task
sendKeyDown id=new-todo ENTER
logData 1
click innerText=Completed


But the result is always the same:
"The test completed but there were no successful results."

Here I have a screenshot of the issue. I've tried both entering the URL and not in the URL field.

What am I doing wrong?

I'd really appreciate some help, because I'm stuck with this for a few weeks.
Find all posts by this user
Quote this message in a reply
07-06-2013, 04:55 AM
Post: #2
RE: How to test with a script?
Greetings

FWIW, I just manually ran these steps locally using IE8 and, in addition to the page not looking *anything* like it does under Firefox, it doesn't respond to the <ENTER> key when the id="new-todo" field is populated.

On the WebPageTest.org site, Firefox, IE8 and IE10 all either took forever to respond or came back with no results. However, if you enter this as your script:

logData 1
navigate http://todomvc.com/architecture-examples/backbone/
setValue id=new-todo Example task
sendKeyDown id=new-todo ENTER
click innerHTML=Completed

and select IE9 as your browser option it will return results rather quickly. Maybe that will help track down what's going on. IMPORTANT NOTE: Be *sure* that your parameters are TAB delimited not spaced.

Hope that helps

Robert




(07-05-2013 01:19 PM)sivicencio Wrote:  I'm doing a project where I need to execute some tests of the TodoMVC app (through the API). For now I'm just using the web interface, and I've tried a lot to execute the following scripted test:

logData 0
navigate http://todomvc.com/architecture-examples/backbone/
setValue id=new-todo Example task
sendKeyDown id=new-todo ENTER
logData 1
click innerText=Completed


But the result is always the same:
"The test completed but there were no successful results."

Here I have a screenshot of the issue. I've tried both entering the URL and not in the URL field.

What am I doing wrong?

I'd really appreciate some help, because I'm stuck with this for a few weeks.
Find all posts by this user
Quote this message in a reply
07-06-2013, 07:59 AM
Post: #3
RE: How to test with a script?
Thanks for your answer, RLilly.

I think that the change you did to the script skips the main interaction I wanted to capture with it (set a value, press ENTER and click a link), because of the "logData 1" sentence at the beginning (at least that's what I can notice by looking at the screenshot).

I'd like to capture test data after those actions, and I still don't know how to do it. That's not all: the real tests I'd like to do are in a mobile environment, but I think that a desktop environment is a good start.

(07-06-2013 04:55 AM)RLilly Wrote:  Greetings

FWIW, I just manually ran these steps locally using IE8 and, in addition to the page not looking *anything* like it does under Firefox, it doesn't respond to the <ENTER> key when the id="new-todo" field is populated.

On the WebPageTest.org site, Firefox, IE8 and IE10 all either took forever to respond or came back with no results. However, if you enter this as your script:

logData 1
navigate http://todomvc.com/architecture-examples/backbone/
setValue id=new-todo Example task
sendKeyDown id=new-todo ENTER
click innerHTML=Completed

and select IE9 as your browser option it will return results rather quickly. Maybe that will help track down what's going on. IMPORTANT NOTE: Be *sure* that your parameters are TAB delimited not spaced.

Hope that helps

Robert




(07-05-2013 01:19 PM)sivicencio Wrote:  I'm doing a project where I need to execute some tests of the TodoMVC app (through the API). For now I'm just using the web interface, and I've tried a lot to execute the following scripted test:

logData 0
navigate http://todomvc.com/architecture-examples/backbone/
setValue id=new-todo Example task
sendKeyDown id=new-todo ENTER
logData 1
click innerText=Completed


But the result is always the same:
"The test completed but there were no successful results."

Here I have a screenshot of the issue. I've tried both entering the URL and not in the URL field.

What am I doing wrong?

I'd really appreciate some help, because I'm stuck with this for a few weeks.
Find all posts by this user
Quote this message in a reply
07-08-2013, 10:44 PM
Post: #4
RE: How to test with a script?
If you want to collect the full sequence then change the logdata 0/1 to be combinesteps. Otherwise WebPagetest will give you quite screwy results if you are trying to measure more than one interaction.

Your last command also needs to be an "andwait" variation, otherwise it's not going to wait for anything to happen before ending the test.

If you can't get it to interact with the page in the way you'd like, the easiest fallback is to use the exec command with a chunk of javascript and you can use a local browser console to get the javascript working the way you'd like before submitting it as part of the test.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-09-2013, 05:03 PM
Post: #5
RE: How to test with a script?
Thank you so much, Patrick. I can see some results now, after weeks of trying!

Now I have a problem with the ENTER key. I've tried with sendKeyDown, sendKeyDownAndWait, sendKeyPress and sendKeyPressAndWait, but it doesn't seem to be working. The script only reaches the "setValue" sentence (for what I can see in the screenshot). I think I'll try with some variations, but for now thanks again for your help.
Find all posts by this user
Quote this message in a reply
08-13-2013, 05:34 AM
Post: #6
RE: How to test with a script?
I did a script test run a few weeks ago and it went well (almost all of it was correct), but now, when I try to re-run this test, it takes forever to only show the result: "The test completed but there were no successful results".

I don't know why this is happening. The script is the same as before (I just clicked the "Re-run test" button).

Any changes to the scripting tool?

Thanks
Find all posts by this user
Quote this message in a reply
08-13-2013, 05:41 AM
Post: #7
RE: How to test with a script?
No, the script part of the agents haven't changed in quite a while but Firefox rolled out an update recently (23 I believe). Do you know if the same script works in IE or Chrome?
Visit this user's website Find all posts by this user
Quote this message in a reply
08-13-2013, 06:29 AM
Post: #8
RE: How to test with a script?
I've just tried with IE 10 and Chrome, and the results are the same. The crazy part is that the script was working a few weeks ago. Weird.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)