Separate traffic from multi-threaded program

3 posts, 1 answers
  1. Dirty
    Dirty avatar
    2 posts
    Member since:
    Oct 2015

    Posted 13 Oct 2015 Link to this post

    I'm using fiddlercore to do some website traffic tests.  Basically, the tests go to a website and verify some http requests were made.  I have a number of different tests that do this across many different websites.  I'm using a test framework that supports parallelism (Nunit 3.0), so I want to be able to run my tests in parallel, but still keep the traffic from each thread separate.  I'm not sure how to do this with fiddlercore, as I can't just give it a process to watch because all of the threads are from the same process.
  2. Answer
    Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 13 Oct 2015 Link to this post

    A web proxy like FiddlerCore doesn't have any means of knowing which thread in a given process was responsible for a HTTP(S) request (assuming that the process is even using a single thread per request to being with). The only way to accomplish what you describe would be to have your test pass the desired information to the proxy, for instance via a custom request header (X-THREAD-ID: 123) that FiddlerCore could delete before forwarding the request to the target.

    Regards,
    Eric Lawrence
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Dirty
    Dirty avatar
    2 posts
    Member since:
    Oct 2015

    Posted 15 Oct 2015 Link to this post

    Thanks Eric, that was extremely helpful.  For anyone that is wondering, I used Selenium's AddCookie method to throw some info into the header and then pulled it out in the "BeforeRequest" delegate.
Back to Top