Jump to content
WAPT Forum
Sign in to follow this  
Guest HUman

JavaScript

Recommended Posts

Guest HUman

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:

Share this post


Link to post
Share on other sites
Guest HUman

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?

Share this post


Link to post
Share on other sites

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.loadtestingtool.com/help/working-with-session-variables.shtml

http://www.loadtestingtool.com/help/parameter-value-dynamic-calculation.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.loadtestingtool.com/quickstart/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.

Share this post


Link to post
Share on other sites
Guest HUman

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.

Share this post


Link to post
Share on other sites
Guest HUman

One more question.

 

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

Share this post


Link to post
Share on other sites

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. ) by name (e.g. UserSession) and returns its value (e.g. 75893.0884568651DQADHfApHDHfcDtccpfAttcf)

Share this post


Link to post
Share on other sites

One more question.

 

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

 

WAPT records and repeats requests.

Share this post


Link to post
Share on other sites
Guest HUman

$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==" />

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...