Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - Try out load testing framework locust.io #1597

Open
wants to merge 43 commits into
base: master
from

Conversation

2 participants
@chrisgilmerproj
Copy link
Contributor

chrisgilmerproj commented Jan 15, 2019

Description

Trying out locust.io load testing framework.

Requires

  • #1685 - automated creation of devlocal users
  • #1823 - don't return nil for dutystation
  • #1824 - rework devlocal methods for signin
  • #1861 - logout should use POST (See #1858 and #1830)
  • #1905 - devlocal create and login as any user

Reviewer Notes

Is there anything you would like reviewers to give additional scrutiny?

Setup

You can run in the browser by running:

locust -f load_testing/locustfile.py 

And then visit http://localhost:8089. Or you can run without the web interface here:

locust -f load_testing/locustfile.py --no-web --clients=50 --hatch-rate=5 --run-time=120s

Code Review Verification Steps

  • Request review from a member of a different team.
  • Have the Pivotal acceptance criteria been met for this change?

References

@chrisgilmerproj chrisgilmerproj self-assigned this Jan 15, 2019

"""
Create a new user for local testing using the CSRF token in the header
"""
resp = client.post(urllib.parse.urljoin(MILMOVE, 'devlocal-auth/new'), headers={'x-csrf-token': csrf})

This comment has been minimized.

Copy link
@chrisgilmerproj

chrisgilmerproj Jan 15, 2019

Author Contributor

Unfortunately this doesn't return the user id because its not really an API endpoint. It instead redirects the user. Would be better to separate the endpoint into an API and a separate login flow so that the tests can use the API endpoint to create the user and get back the ID.

This comment has been minimized.

Copy link
@tinyels

tinyels Jan 23, 2019

Contributor

We could create a new endpoint to do this too.

This comment has been minimized.

Copy link
@chrisgilmerproj

chrisgilmerproj Jan 23, 2019

Author Contributor

I've got a ticket to do this but its a bit down my list: https://www.pivotaltracker.com/story/show/163239064

@codecov

This comment has been minimized.

Copy link

codecov bot commented Feb 14, 2019

Codecov Report

Merging #1597 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1597   +/-   ##
=======================================
  Coverage   50.52%   50.52%           
=======================================
  Files         441      441           
  Lines       19171    19171           
  Branches     1646     1646           
=======================================
  Hits         9687     9687           
  Misses       8625     8625           
  Partials      859      859

@seq_task(6)
def logout(self):
self.client.get("/auth/logout")

This comment has been minimized.

Copy link
@chrisgilmerproj

chrisgilmerproj Mar 20, 2019

Author Contributor

Change this to POST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.