How to store data from a loop execution

60 views
Skip to first unread message

sambit...@xvela.com

unread,
Apr 25, 2017, 3:26:30 AM4/25/17
to Gatling User Group
Hi,

Here is my simplified use case, wondering if anyone has a suggestion for me. 

Here is my objective:
1) Admin logs in and creates 'n' number of users in a loop(sequentially). A simple http POST request in a loop.
2) Each successful call, returns a unique activation token that the user will require to setup his/her account.
3) I want the list of tokens after the loop executed(step 1).
4) I want to have 'n' user setup their account using those tokens in the next step simultaneously.

Any suggestions?

Aniket Ghodke

unread,
Apr 25, 2017, 3:34:30 AM4/25/17
to gat...@googlegroups.com

Is this use case or for test data generation ?

What is token expiry time ?

If it's for test data generation and token expiry time less let's have admin registration + user account setup in one flow.


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sambit...@xvela.com

unread,
Apr 25, 2017, 12:56:51 PM4/25/17
to Gatling User Group
However, that is avoiding the real world use case. I am hopeful that there may be a better way in Gatling to handle that rather than changing my use case. 

I can think of storing those activation tokens in a mutable data structure in the session object and using it later. But wondering if anyone else has any suggestion for me or thought about it.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.

Barry Perez

unread,
Apr 26, 2017, 5:13:20 AM4/26/17
to Gatling User Group
Why not use Redis as an intermediate data store?

Mishra, Sambit

unread,
Apr 26, 2017, 5:23:23 AM4/26/17
to gat...@googlegroups.com
That's an interesting thought, Barry. Can you please post a sample snippet or link to follow up?

--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/c9cAexgBOsI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+unsubscribe@googlegroups.com.

Barry Perez

unread,
Apr 26, 2017, 5:41:43 AM4/26/17
to Gatling User Group
Hi,

Redis client info available here:

https://github.com/debasishg/scala-redis

Take a look at Gatling's Redis Feeder (only used for reading from Redis - but you can get the idea of how the client works - it's pretty simple to implement both read and write yourself):



Hope this helps,

Barry
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages