HomeSUPPORT QUESTIONS

Need help with StresStimulus? Start here.

Extractor for multiple dynamic values - give up Messages in this topic - RSS

Perftester
Perftester
Posts: 2


2/6/2025
Perftester
Perftester
Posts: 2
Hello folks,

I'm currently trying to script a journey in which I am selecting an appointment/booking from a view (in the Web browser) which shows the view of each weekday, with timeslots for each day. The timeslots which are available are highlighted and those which are not available cannot be clicked on. Anyhow in terms of the Response captured, there is a Compute Slot request (to which the response is given) that has the date and timeslots given each with a SCORE. Timeslots with a score of either 2, 3, 4 or 5 are valid for selection.
I am struggling to create an Extractor that is able to use the Start & End time for the correct Score given (it works for some iterations but i'm unable to correctly extract the correct values consistently)

Example of Response:

"results":[{"date":"2025-02-12","slotOutputs":[{"start":"08:00:00","end":"12:30:00","score":0,"travelTimeIncrease":0,"costIncrease":0.0,"internalCostIncrease":0.0},{"start":"10:00:00","end":"14:00:00","score":5,"travelTimeIncrease":148,"costIncrease":0.0,"internalCostIncrease":0.0},{"start":"12:30:00","end":"16:30:00","score":5,"travelTimeIncrease":148,"costIncrease":0.0,"internalCostIncrease":0.0},{"start":"08:00:00","end":"16:30:00","score":5,"travelTimeIncrease":148,"costIncrease":0.0,"internalCostIncrease":0.0}]},{"date":"2025-02-13","slotOutputs":[{"start":"08:00:00","end":"12:30:00","score":1,"travelTimeIncrease":6880,"costIncrease":0.0,"internalCostIncrease":0.0,"newRoute":true},{"start":"10:00:00","end":"14:00:00","score":1,"travelTimeIncrease":6880,"costIncrease":0.0,"internalCostIncrease":0.0,"newRoute":true},{"start":"12:30:00","end":"16:30:00","score":1,"travelTimeIncrease":6880,"costIncrease":0.0,"internalCostIncrease":0.0,"newRoute":true},{"start":"08:00:00","end":"16:30:00","score":1,"travelTimeIncrease":6880,"costIncrease":0.0,"internalCostIncrease":0.0,"newRoute":true}]}

The BOLD are the slots which are valid as Booking options

For the above, i've got a Text Delimited extractor that has Text before = "start":"10:00:00","end":"14:00:00", Text After = "score":5, and then i am able to extract the Start and End time for the booking. However for each iteration, the scores given are not consistent.

Example 2 of Response:


"results":[{"date":"2025-02-13","slotOutputs":[{"start":"08:00:00","end":"12:30:00","score":4,"travelTimeIncrease":1256,"costIncrease":1.1164444444444446,"internalCostIncrease":1.1164444444444446},{"start":"10:00:00","end":"14:00:00","score":4,"travelTimeIncrease":1256,"costIncrease":1.1164444444444446,"internalCostIncrease":1.1164444444444446},{"start":"12:30:00","end":"16:30:00","score":4,"travelTimeIncrease":1256,"costIncrease":1.1164444444444446,"internalCostIncrease":1.1164444444444446},{"start":"08:00:00","end":"16:30:00","score":4,"travelTimeIncrease":1256,"costIncrease":1.1164444444444446,"internalCostIncrease":1.1164444444444446}]}


Given that for each iteration the Score which is valid may have a value of 2,3,4 or 5 (invalid options are scores of 0 and 1). With extrators i am struggling to find the most logical approach.

Any help and guidance here would be appreciated. Thanks
0 link
George @StresStimulus
George @StresStimulus
Administrator
Posts: 568


2/6/2025
George @StresStimulus
George @StresStimulus
Administrator
Posts: 568
It appears you’re trying to extract two values (the start and end of a booking), which will likely require two separate extractors. Based on your description, it seems you've created an extractor that works intermittently. This usually indicates that the extractor isn't fully defined, possibly due to unaccounted variability in the server responses. To resolve this, you'll need to adjust your extractor settings to better accommodate these variations.
However, resolving script configuration issues typically requires reviewing your specific script within your test environment. Unfortunately, this level of support isn't feasible on the public forum.
  • If you’re a StresStimulus customer, please reach out to your support representative, who can assist in configuring your script to meet your requirements.
  • If you're evaluating StresStimulus, we encourage you to https://www.stresstimulus.com/trials/free-test-configuration and request a complimentary test configuration session. Our team will be happy to guide you through the process.


Let us know if you have any further questions!

- Cheers
0 link
Perftester
Perftester
Posts: 2


2/6/2025
Perftester
Perftester
Posts: 2
Ok thanks George, I will have a think about the trial option - will also look into potential extractor options. Cheers
0 link






Copyright © 2025 Stimulus Technology