How to get number of http requests in synthetic script transaction

I have a synthetic script with multiple transactions. I want to capture the number of HTTP requests from a particular transaction .
I can get total number of requests from my synthetic script
SELECT Count(*) from SyntheticRequest WHERE monitorName = ‘**’ FACET checkId.
how to get number of HTTP requests from a particular transaction.

Any suggestions appreciated

Hey @vino.joy1

Would this work:

SELECT count(*) FROM SyntheticRequest WHERE contentCategory = 'html'  FACET checkId

@RyanVeitch Thanks for looking

This doesn’t seems to give number of requests for particular transaction in my synthetic script

Hi, @vino.joy1: Can you be more specific about what you mean by “transaction”?

@philweber Thanks for looking

let’s say …synthetic script do as below

  1. Open Page 1
  2. Close Page 1
  3. Open Page 2
  4. Close Page 2
  5. Open Page 3
  6. Close Page 3

I want to capture all the http requests on step 3 (Open Page 2)

Ah, OK. Try this:

SELECT count(*) 
FROM SyntheticRequest 
WHERE monitorName = 'Your Monitor Name' 
  AND pageref = 'page_1'
FACET checkId
1 Like

@philweber , above query give some idea … still doesnt seems to be reaching what i am looking

below is my script (badly formated)

I am looking for number of HTTP requets happens for logger.log(15, “Page Usable”); to logger.log(16, “Opening Widget”);

then(() => {
            logger.log(15, "Page Usable");
                  return $browser.waitForAndFindElement(By.xpath("//*[@id='asset-results']/"), DefaultTimeout)
                .then(function (el) {
 .then(function() {
  console.log( '$browser.switchTo().frame("iframe-0")');
  return $browser.switchTo().frame($browser.findElement(By.xpath("//asset-view-interactive"))   ); 
.then(function() {
  return $browser.switchTo().frame("iframe"),DefaultTimeout })

.then(function() {
  console.log('Search for Frist element');
  DefaultTimeout })

  .then(function () {
         console.log('Looking first elelment ');

    return element.getText().then(function(text){
    assert.equal('Convert Larger Units to Smaller Units', text, 'Text chek failed for Convert Larger Units to Smaller Units');
      }).catch(function(text) {
  console.log(" inside catch");
 return console.log("end of the first iframe load");

.then(function() {
    logger.log(16, "Opening Widget");
   return $browser.switchTo().frame("data-uuid-*****"),DefaultTimeout })

parentId seems to be matching to number transaction

Hmmm I don’t think that’s possible out of the Box @vino.joy1, is there anything within the requests that would indicate you are in this step? For example, if the path of the URL changes when you switch to the frame and it’s unique to that frame?

The only other option I can think of would be to log 2 timestamps as Custom Attributes, 1 when the Step starts, 1 when it ends. This will add those 2 Timestamps to the SyntheticCheck event though, so what you would have to do is write a custom script to pull those timestamps from that event and apply them to the SyntheticRequest query, with SINCE timestamp1 UNTIL timestamp2.
That would be a great project for a Custom NerdPack :smiley: