Jump to content


JavaScript


  • Please log in to reply
9 replies to this topic

#1 Guest_HUman_*

Guest_HUman_*
  • Guests

Posted 27 July 2011 - 11:43 AM

Hello!

First sorry if this is posted somewhere but i didn't find any answer to my problem.

I am testing some website which has JavaScript.
First thing I noticed that when I record the scenario the pages which are requested by the browser but are not shown in the GUI are displayed and every time when you verify the test the errors appear because of them. I know that this pages are need to be there eg. for refreshing or loading data to the site but when starting test or verifiying test the errors appears (500 iternal server error) which is logical but unnecessary. OK this is the first part.

Second part, on this page there is a view which has buttons which appear if you click lets say on some time line (one url and post url other) you enter some data and you click on the button than the data is saved. Problem is when you click on the button on the recording scenario opens a new url which has all the parameters that you put in but this url is a type of url wich i described above and you get an error.

So what to do?! How do I enter the data?

Sorry for my bad ENG. :rolleyes:

#2 Guest_HUman_*

Guest_HUman_*
  • Guests

Posted 28 July 2011 - 06:16 AM

Hello!

I think this will be the right theme for this question. Obviously i am dealing with JavaScript.
When I record my test scenario and when i verify it the error appears (500 intrnal server error).
OK I konw that error is from the site wich is not shown to the user but that site is a POST method which has all the parameters in it.
Problem is if I delete thet site the paramaeter are gone but If I levae that site a error appears.

What to do?

#3 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 28 July 2011 - 10:35 AM

Most probably the problems appear because you have not parameterized the HTTP requests in your profile after recording it. Note that initially all requests are recorded as is. If you use a recorded profile without modifications, WAPT will simply repeat all the same requests with the same values of all parameters. However when working with dynamic site content, some parameters should have unique values for each session. The values of such parameters should be extracted from server response to the previous requests. You can read more about that using the following two links.

http://www.loadtesti...variables.shtml
http://www.loadtesti...lculation.shtml

(Note: The above links refer to WAPT Pro 2.0. If you use other version of the product, some GUI elements can be different, but the whole concept is the same. You can also find corresponding topics in the help file provided with your product.)

Recently we also created a demo clip showing step by step how to perform the parameterization. You can download it here: http://www.loadtesti...rt/WAPTdemo.avi

Also, I recommend you to use the "Verify test" button to check your profiles before running the test. It will execute each profile one time and log all the details. After the verification is finished you can expand the "Logs" folder in the left view. You will see all the requests and server responses logged during the profile execution. You can also use logs for test runs, but you need to choose the level of details on the “Log and Report Settings” page.

Note also that when you record a profile, you should start from the very first URL that you use to access the web site. If you start recording from a page inside a user session, your profile will be incomplete and will not produce a valid session during the test.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#4 Guest_HUman_*

Guest_HUman_*
  • Guests

Posted 28 July 2011 - 11:33 AM

OK that was true. My mistake that i didn't use variables. :wacko:

But there is another problem.
I have a variable "RequestVerificationToken" wich type is hidden. If I search under parameter hidden it doesn't find it but if I choose the variables and then this variable "RequestVerificationToken" it's not the same string.

#5 Guest_HUman_*

Guest_HUman_*
  • Guests

Posted 28 July 2011 - 11:59 AM

One more question.

Can WAPT click on buttons or all it does is just page requests?

#6 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 29 July 2011 - 09:21 AM

OK that was true. My mistake that i didn't use variables. :wacko:

But there is another problem.
I have a variable "RequestVerificationToken" wich type is hidden. If I search under parameter hidden it doesn't find it but if I choose the variables and then this variable "RequestVerificationToken" it's not the same string.


$Hidden function searches value in input field (e.g. <input type="hidden" name="UserSession" value="75893.0884568651DQADHfApHDHfcDtccpfAttcf">) by name (e.g. UserSession) and returns its value (e.g. 75893.0884568651DQADHfApHDHfcDtccpfAttcf)
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#7 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 29 July 2011 - 09:29 AM

One more question.

Can WAPT click on buttons or all it does is just page requests?


WAPT records and repeats requests.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#8 Guest_HUman_*

Guest_HUman_*
  • Guests

Posted 29 July 2011 - 09:29 AM

$Hidden function searches value in input field (e.g. <input type="hidden" name="UserSession" value="75893.0884568651DQADHfApHDHfcDtccpfAttcf">) by name (e.g. UserSession) and returns its value (e.g. 75893.0884568651DQADHfApHDHfcDtccpfAttcf)


But my order is <input name="__RequestVerificationToken" type="hidden" value="/4VQCiAjqvesoZxYg4H2Gj6tqg==" />

#9 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 662 posts

Posted 29 July 2011 - 10:10 AM

But my order is <input name="__RequestVerificationToken" type="hidden" value="/4VQCiAjqvesoZxYg4H2Gj6tqg==" />


Then you need $Hidden(__RequestVerificationToken,0).
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com

#10 Guest_HUman_*

Guest_HUman_*
  • Guests

Posted 22 August 2011 - 07:55 AM

I solved this problem with a variable. :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users