Can I Run testscripts by turning on Js in Load testing

Hi Team,

I have gone through the advance load testing posters demo application and you are running the scripts by configured “com.xceptance.xlt.javaScriptEnabled = false” in default.properties. Can i turn on JS for any particular script (Ex: For AddtoCart) functionality .
The following comments which i found in script file
–> Disable JavaScript for the complete test case to reduce client side resource consumption.
–> If JavaScript executed functionality is needed to proceed with the scenario (i.e. AJAX calls)
–> we will simulate this in the related actions.

Thanks,
Shekar

You can turn it on either in the code or by setting this. Assuming your test class is com.test.TFoo and in the test class mapping you later set it to TFoobar:

# global
com.xceptance.xlt.javaScriptEnabled = false

##
## Only one of the below is needed, depends on the goal
##
# redefine it for the class
com.test.TFoo.com.xceptance.xlt.javaScriptEnabled = true

# redefine it for the mapped test case only
TFoobar.com.xceptance.xlt.javaScriptEnabled = true

Should work that way. Works for almost properties that way.

Important: Turning on JS does not necessarily get you to the working JS due to the dependencies on JS version and browser features. In addition, the running JS code once again eats into you test cpu budget. That is the reason why almost no load test engine support JS execution (except for its own test code) but all work on request level.

Thanks for the valuable time ,
I have enabled JS before start execution in my class and i am trying to click a button it using a ajax request and the response is in Json format . I am able to get 200 as response but getting an error message “The server response could not be parsed as HTML”, Can you help me out of this .

Thanks
Shekar

Check the response of the server and use the result browser for that. We cannot help you to diagnose error messages in general. Provide us sufficient information here, or if not possible, please consider a support contract so we can share confidential material.