Unanswered question

At end of the test, need to run a DB sql select query with Test start and end time

We need to design the below scenario
1) 30 minutes of test
2) once test is completed, a sql query has to be executed with the start and end times of 30 minutes test, substituted in the query.

(we can give the sql query with the start and end times replaced with a variable. at the end of the test, this has to be substituted and executed).

please let us know if we can do this in neoload

Pepsin S.
Pepsin S.

Pepsin S.

Level
0
22 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

I'm not sure to completely understand your goal. So first, you will run a 30 minutes test and then you would like to execute a SQL select.

So i guess you would need two different populations. The first one will execute your test and the second one will start when the first population is completed. This can be done in the Advanced parameter of your second population.

Within that second population, you will have a virtual user that will contain a Javascript in order to execute your SQL query.

I'm not sure to understand your start and end times with your SQL query. Could you provide more details?

 

Pepsin S.
Pepsin S.

Pepsin S.

Level
0
22 / 100
points

Thanks Nouredine. I want to run the below query at the end of the test

--------------------------------
SELECT reqTable.vdl_tran_id,
DATA_SRC_ID,
FROM stg_req_trans reqTable,
WHERE reqTable.start_dt_tme BETWEEN TO_TIMESTAMP('2014-03-17 04:54:00.0', 'yyyy-MM-dd HH24:MI:SS.FF') AND TO_TIMESTAMP('2014-03-17 05:24:00.0', 'yyyy-MM-dd HH24:MI:SS.FF')
)
-------------------

As you can see, the FROM and TO times will be the start and end time of the 30 minutes test. So these times should be dynamically updated in the query at the end of the test, and sql shd be executed

Pepsin S.
Pepsin S.

Pepsin S.

Level
0
22 / 100
points

It will be good if i can get a sample code