0
votes

I have 1 thread group with 4 HTTP requests, each using separate csv to get input(json).

I want to run load testing with 100 users for 10 loops for all of them.

Expected result: run HTTP request 1 for 100*10 times then move to HTTP request 2 and run 100*10 times and so on.

First HTTP request is provided with correct values and second with incorrect values, So first HTTP request gives 0% error and 2nd thread gives 100% error.

Issue: While running thread, 2nd HTTP request is also giving 0% error instead of 100% as it is somehow picking values from same csv as the first HTTP request(they both have separate CSV data set config with separate csv files having different data), while they are working fine individually.

My test plan

CSV Data Set configuration

1
can you call for different csv file? for example 1.csv, 2.csv and get file by ${__threadNum}.csv?user7294900
I am calling different csv files using CSV Data set config. But somehow in View Result Tree the response of 2nd thread is incorrect. It is working fine if I run 1 thread at a time manually(disabling other threads)iamgroot
Can you describe/show your test plan in question?user7294900
I have 4 api's which needs to be using separate csv. each of them needs to run 100*10 times, they should run as "one at a time"(API 1 runs 1000 times before running API 2 and so on). For this I am using separate threads for each api and each thread have csv data set config to read csv data.iamgroot
Looks like you are confusing Threads and Thread Groups. Thread Groups can be configured to run consecutively, threads cannot (or at least not with any checkbox).Kiril S.

1 Answers

0
votes

In the same Thread Group all threads will be running simultaneously, there's no configuration option that would allow HTTP requests in the same thread group to run sequentially. So you can fix it in one of the following ways:

  1. Put each HTTP request in its own Thread Group, and use Run Thread Groups Consecutively option

    Thread Group 1
        HTTP Request 1
    Thread Group 2
        HTTP Request 2
    ...
    
  2. Use controllers and timers to get each HTTP request executed in loop and all threads to wait before starting the next one:

    Thread Group
        Loop Controller <-- set Loop Count to 10
            HTTP Request 1
        Synchronizing Timer <-- set Group by parameter to 100, so you wait for all threads to finish with first loop
        Loop Controller
            HTTP Request 2
        Synchronizing Timer
        ...