-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea2efb8
commit d8873ad
Showing
5 changed files
with
170 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE tsung SYSTEM "/usr/local/share/tsung/tsung-1.0.dtd" []> | ||
<tsung loglevel="notice"> | ||
<clients> | ||
<client host="localhost" use_controller_vm="true" /> | ||
</clients> | ||
<servers> | ||
<server host="rails-to-riches.eba-viwn7vp8.us-west-2.elasticbeanstalk.com" port="80" type="tcp" /> | ||
</servers> | ||
<load> | ||
<arrivalphase phase="1" duration="60" unit="second"> | ||
<users arrivalrate="2" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="2" duration="60" unit="second"> | ||
<users arrivalrate="4" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="3" duration="60" unit="second"> | ||
<users arrivalrate="8" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="4" duration="60" unit="second"> | ||
<users arrivalrate="16" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="5" duration="60" unit="second"> | ||
<users arrivalrate="32" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="6" duration="60" unit="second"> | ||
<users arrivalrate="64" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="7" duration="60" unit="second"> | ||
<users arrivalrate="128" unit="second"></users> | ||
</arrivalphase> | ||
</load> | ||
<sessions> | ||
<session name="browse_restaurants" probability="100" type="ts_http"> | ||
<!-- User Login --> | ||
<request subst="true"> | ||
<dyn_variable name="jwt" re='\"jwt\":\"([^\"]+)\"' /> | ||
<http url="/api/login" method="POST" contents_from_file="./login.json"> | ||
<http_header name="Content-Type" value="application/json" /> | ||
</http> | ||
</request> | ||
<thinktime value="1" /> | ||
|
||
<!-- Loop over known restaurant IDs --> | ||
<for var="restaurant_id" from="1" to="15" incr="1"> | ||
|
||
<!-- View Specific Restaurant Details --> | ||
<request subst="true"> | ||
<http url="/api/restaurants/%%_restaurant_id%%" method="GET"> | ||
<http_header name="Authorization" value="Bearer %%_jwt%%" /> | ||
</http> | ||
</request> | ||
<thinktime value="1" /> | ||
|
||
<!-- View Dishes for the Restaurant --> | ||
<request subst="true"> | ||
<http url="/api/restaurants/%%_restaurant_id%%/dishes" method="GET"> | ||
<http_header name="Authorization" value="Bearer %%_jwt%%" /> | ||
</http> | ||
</request> | ||
|
||
<!-- View Reviews for the Restaurant --> | ||
<request subst="true"> | ||
<http url="/api/restaurants/%%_restaurant_id%%/reviews" method="GET"> | ||
<http_header name="Authorization" value="Bearer %%_jwt%%" /> | ||
</http> | ||
</request> | ||
|
||
<!-- View Comments for a Specific Review --> | ||
<for var="review_id" from="1" to="3" incr="1"> | ||
<request subst="true"> | ||
<http url="/api/restaurants/%%_restaurant_id%%/reviews/%%_review_id%%/comments" method="GET"> | ||
<http_header name="Authorization" value="Bearer %%_jwt%%" /> | ||
</http> | ||
</request> | ||
</for> | ||
<thinktime value="1" /> | ||
|
||
<!-- View Photos for the Restaurant --> | ||
<request> | ||
<http url="/api/restaurants/%%_restaurant_id%%/photos" method="GET"> | ||
<http_header name="Authorization" value="Bearer %%_jwt%%" /> | ||
</http> | ||
</request> | ||
<thinktime value="1" /> | ||
</for> | ||
</session> | ||
</sessions> | ||
</tsung> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"user": { | ||
"email": "[email protected]", | ||
"password": "password" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"review": { | ||
"rating": 5, | ||
"content": "This is a test review." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE tsung SYSTEM "/usr/local/share/tsung/tsung-1.0.dtd" []> | ||
<tsung loglevel="notice"> | ||
<clients> | ||
<client host="localhost" use_controller_vm="true" /> | ||
</clients> | ||
<servers> | ||
<server host="rails-to-riches.eba-viwn7vp8.us-west-2.elasticbeanstalk.com" port="80" type="tcp" /> | ||
</servers> | ||
<load> | ||
<arrivalphase phase="1" duration="90" unit="second"> | ||
<users arrivalrate="1" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="2" duration="90" unit="second"> | ||
<users arrivalrate="3" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="3" duration="90" unit="second"> | ||
<users arrivalrate="6" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="4" duration="90" unit="second"> | ||
<users arrivalrate="12" unit="second"></users> | ||
</arrivalphase> | ||
<arrivalphase phase="5" duration="90" unit="second"> | ||
<users arrivalrate="24" unit="second"></users> | ||
</arrivalphase> | ||
</load> | ||
<sessions> | ||
<session name="add_reviews" probability="100" type="ts_http"> | ||
<!-- User Login --> | ||
<request subst="true"> | ||
<dyn_variable name="jwt" re='\"jwt\":\"([^\"]+)\"' /> | ||
<http url="/api/login" method="POST" contents_from_file="./login.json"> | ||
<http_header name="Content-Type" value="application/json" /> | ||
</http> | ||
</request> | ||
<thinktime value="1" /> | ||
|
||
<!-- Loop over known restaurant IDs --> | ||
<for var="restaurant_id" from="1" to="15" incr="1"> | ||
|
||
<!-- View Specific Restaurant Details --> | ||
<request subst="true"> | ||
<http url="/api/restaurants/%%_restaurant_id%%" method="GET"> | ||
<http_header name="Authorization" value="Bearer %%_jwt%%" /> | ||
</http> | ||
</request> | ||
<thinktime value="1" /> | ||
|
||
<!-- Submit a Review --> | ||
<request subst="true"> | ||
<http url="/api/restaurants/%%_restaurant_id%%/reviews" method="POST" contents_from_file="./review.json"> | ||
<http_header name="Content-Type" value="application/json" /> | ||
<http_header name="Authorization" value="Bearer %%_jwt%%" /> | ||
</http> | ||
</request> | ||
<thinktime value="1" /> | ||
|
||
<!-- Navigate Back to Dashboard (View All Restaurants) --> | ||
<request> | ||
<http url="/api/restaurants" method="GET"> | ||
<http_header name="Authorization" value="Bearer %%_jwt%%" /> | ||
</http> | ||
</request> | ||
<thinktime value="1" /> | ||
</for> | ||
</session> | ||
</sessions> | ||
</tsung> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters