Current time: 05-19-2013, 06:49 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to validate scripts?
11-10-2011, 12:37 AM
Post: #1
how to validate scripts?
Hi,
in the gui for creating scripts is a checkbox "validate". What is it for and what do I have to put in the "Validation Request" textfield? I can't find anything in wiki/docs about that functionality. Do I have to put a DOM-element-attribute into the textfield like in wpt-scripting (e.g. id=myId) and the existance of that element in the requested dom is proofed during validation? Or is it for a sub-request of a resource which is proofed like setDOMRequest in scripting?
Thanks, Nils
Find all posts by this user
Quote this message in a reply
11-10-2011, 12:57 AM
Post: #2
RE: how to validate scripts?
It performs validation on the results, but only at the resource level. So, as an example, I can validate that a page includes a request for a particular js file, or css, etc.

The thought is that on a page that errors out you may see a request for something like /css/error.css, or myerrorlib.js, etc.

Since monitor doesn't have access to the actual contents/html of the results this is the best that can be done with regards to validating a request succeeded.

An example entry from one of my scripts:

Validation Requestion: /.*\/site\/flightsScripts\.js/

As you can see, it's a regex.

I've been working on updated docs, although it's coming slowly, at http://www.wptmonitor.org

Tony Perkins
Find all posts by this user
Quote this message in a reply
11-10-2011, 01:50 AM
Post: #3
RE: how to validate scripts?
Hi,
first thanks for the quick answer.
One supplemental question:
If I have a script with multiple steps (e.g. calling the site of a special item, goto shopping cart, registration, order in a shop) from which just one is measured (controlled via wpt-script-commands logData 0 and logData 1). Is the validate-option just proofed for the measured step or are the resource-urls of all steps of the script included for the validation?
Nils
Find all posts by this user
Quote this message in a reply
11-10-2011, 02:47 AM
Post: #4
RE: how to validate scripts?
I will have to confirm, but I believe monitor will view it as a single request and look for the match in the list of all request made during the navigation. I know that's not optimal, but it was the best I could do given the constraints I had at the time.

Let me know if you have ideas about how to better implement this. How are your PHP coding skills? :-)

Tony Perkins
Find all posts by this user
Quote this message in a reply
11-22-2011, 09:29 PM
Post: #5
RE: how to validate scripts?
I assume that only the resources of the "logData1-Step" come with the results from WPT. So Searching through all these resources would be OK in that case.
When I will implment these Jobs I will test that functionality. If I detect some deficiencies I will use my modest PHP-skills to fix it the way I need it. I'd give you respective feedback.
Find all posts by this user
Quote this message in a reply
01-05-2012, 12:09 AM
Post: #6
RE: how to validate scripts?
It behaves like I assumed: Only the resources of the "logData1-Step" come with the results from WPT. So just these resource-urls are considered for validation.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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