1 Replies - 225 Views - Last Post: 05 September 2019 - 08:35 PM

#1 O'Niel   User is offline

  • D.I.C Regular

Reputation: 15
  • View blog
  • Posts: 461
  • Joined: 13-September 15

Simulating peak-moments in application using Python-script

Posted 05 September 2019 - 05:50 PM

Hi

Imagine you have made a web-application like e.g a webshop.
And you want to test how stable it is and handles a lot of orders at the same time.

Would writing a Python script which create's multiple users at once and let them buy a
lot of products be a good way to stresstest the stability of your application?
To simulate peak-moments in your application...

I'd write this script by creating multiple user-objects, and give those objects functions like createAccount(name, pass, email, birthdate) and buyItem(itemId, amount),... In which the functions make POST-requests like e.g createAccount.php?name=FIRSTNAME&lastname=...

I'd also create a lot of threads in my Python-script to really simulate multiple users and orders at the same time.

Good idea or nah? Are there better (free) ideas? Which do not include gathering hundred people. :)/>/>/>

Thanks!

PS. The intended title of my post was "Simulating peak-moments in application using Python-script?" But accidentally hit enter instead of backspace... And can't edit the title anymore.

This post has been edited by Skydiver: 05 September 2019 - 08:22 PM
Reason for edit:: Updated the title.


Is This A Good Question/Topic? 0
  • +

Replies To: Simulating peak-moments in application using Python-script

#2 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 7020
  • View blog
  • Posts: 23,840
  • Joined: 05-May 12

Re: Simulating peak-moments in application using Python-script

Posted 05 September 2019 - 08:35 PM

I would suggest looking at some off-the-shelf load testing tools first before trying to do the Python scripting.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1