Problem with validation rule RRS feed

  • Question

  • Hi
    I have two question about validation rules:

    1) I create Extract rule (Extract Attribute Value) for some field. It work correctly. But when I create validation rule (Required Attribute Value) for same field and enter in required field same values which I enter in Extraction rule, I wait that validation rule also will work correctly. But it not work. What difference between same fields in extraction and validation rules? why validation rule don't work in this situation?
    2) how can I use validation rule result in code of web test. In Extraction rule for this goal I use Context Parameter and how can I do this with validation rule?

    Tuesday, September 29, 2009 12:34 PM


  • Hello,

    One thing to be aware of is that validation rules help verify that a Web application is working correctly by validating the existence of text, tags, or attributes on the page returned by a Web request. Extraction rules are similar to validation rules, but instead of verifying data, they will extract the data and store it in the Web test context.

    So, as I mentioned above, validation rule works by validating the existence of text, tags, or attributes, so there must be one expected value. Could you please verify that if you have set the value of 'Expected Value' property of this validation rule. About question 2, as I understand. Unfortunatelly, the validation result is not exposed, but if you are using your own rules or writing custom validation function, you can add the result to context. Here is a post related to it.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    • Marked as answer by Kastet Thursday, October 1, 2009 9:13 AM
    Thursday, October 1, 2009 4:02 AM