Ad Widget

Collapse

Change values returned by web check items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joby
    Junior Member
    • Nov 2012
    • 29

    #1

    Change values returned by web check items

    Hi,

    Is there any possibility to change the value returned by the agent in a web check.

    eg:- "Failed step of scenario "scenario name" . step". is the default value returned by the agent for 'web.test.fail[scenario name]' key. while used in a trigger.

    My question is how can I customize the returned value to something that would suite my requirement.

    Eg:- Web Check failed strings not matching.
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    This is not configurable.
    How about using web.test.error[Scenario]?
    When in this case for instance the value "required pattern not found" still don't suit your need, then you could put the desired text statically in the trigger name and check whether web.test.error[Scenario] includes the respective string.

    Comment

    • Joby
      Junior Member
      • Nov 2012
      • 29

      #3
      Originally posted by BDiE8VNy
      This is not configurable.
      How about using web.test.error[Scenario]?
      When in this case for instance the value "required pattern not found" still don't suit your need, then you could put the desired text statically in the trigger name and check whether web.test.error[Scenario] includes the respective string.
      Can you elaborate. How can I put the desired value in a trigger.

      Comment

      • BDiE8VNy
        Senior Member
        • Apr 2010
        • 680

        #4
        One way could be:
        Trigger name: Web scenario 'scenario name' failed: {ITEM.VALUE}
        Trigger expression: {host:web.test.error[scenario name].nodata(15m)}=0

        or another could be:
        Trigger name: Web scenario 'scenario name' failed in step {ITEM.VALUE1} because {ITEM.VALUE2}
        Trigger expression: {host:web.test.fail[scenario name].last()}>0|{host:web.test.error[scenario name].diff()}<0

        In the second example the condition regarding web.test.error is logically useless and will always be FALSE. So when the trigger gets fired, then it's because of the first condition. The second one is only there to reference its value via {ITEM.VALUE2}.

        Not tested. Just to get the idea.

        Comment

        Working...