Home Tasks. You can practice yourself.

Home Task #1.

Creating complicated scenario.

0. Prepare several scripts:

0.1. Script that creates users with different roles: Writers and Readers;
0.2. Script that will generate POSTS;
0.3. Script that will create comments (similar to POSTS);
0.4. Script that will clear all the Data after you.

1. Users:

1.1. Writers – users, who can create and edit POSTS;
1.2. Readers – users, who can read POSTS and leave comments;
1.3. Anonymous – users, who are not registered in the system and can ONLY read POSTS (You do not need to create them in the system).

2. Data:

2.1. POSTS – generate POST with random number of symbols from 100 to 1000 symbols;
2.2. POST’s TITLE – with random number of symbols from 30 to 100 symbols;
2.3. COMMENTS – generate comments with random number of symbols from 100 to 500 symbols.

3. The TASK.

3.1. Script #1 – Level: EASY. Will be covered on lectures.

Legend:
We have several (we are not so popular, so we will use just 10 users) unregistered users, who are surfing over current ‘app’.
These users (10 users, just to remind) serf through all the pages and sub-pages in our ‘app’.
Page names could be: Hardcoded, taken from *.csv file, randomly selected using Regular Expression Extractor.

3.2. Script #2 – Level: Not so EASY.

Legend:
Our ‘app’ became more and popular. Our Writers (4 users) (users, who can create POSTS) wrote some number of POSTS (from 50 to 100 POSTS).
Our fan-readers (100 users, who can read POSTS and leave COMMENTS, just to remind, who is who…) and Anonymous users (100 users, who can, just read POSTS, without commenting them) started visiting our ‘app’.
As statistics showed, the distribution among users was:
readers, who leave comments – 30%;
– readers, who leave 2 comments – 75%; (percentage inside the ‘leave comments’ group)
– readers, who leave 5 comments – 25%. (percentage inside the ‘leave comments’ group)
readers, who do not leave comments – 70%;
Anonymous, who read from 1 to 3 [inclusive] POSTS – 40%;
Anonymous, who read from 4 to 7 [inclusive] POSTS – 60%.
!!! CAUTION !!! Try not to get crazy creating this Script! 🙂

Home Task #2.

Getting results and making conclusions.

Here we will use SCRIPT #2 from the First home task and just change some configurations in ‘Thread groups’.

Task 1 – Capacity testing.

AIM: Find out number of users, that our ‘app’ can hold.
Generate ‘unlimited’ number of users until you’ll see that our ‘app’ started work incorrect.
!!! CAUTION !!! Use wise THINK times between the TRANSACTIONS that users perform.
Provide several runs and make some conclusions.
Do not forget to collect Hardware metrics using Telegraf or PerfMon.

Task 2 – Stability testing.

AIM: Find out how long our ‘app’ can be operated by some amount of users. (Do you remember the definition of ‘Stability testing’?)
Provide at least: 3 hours, 5 hours and 8 hours runs with average number of users (10 – Readers, 30 – Anonymous) and make some conclusions.
Do not forget to collect Hardware metrics using Telegraf or PerfMon.

Task 3 – Stress testing.

AIM: Find out if our ‘app’ can hold Extreme users activity.
LEGEND: We became very popular, and the POSTS, we are providing in our ‘app’, are extremely valuable. The future of the galaxy depends on our POSTS!
Provide several runs (2-3 runs) with such parameters:
Writers up to 120;
Readers up to 200;
!!! CAUTION !!! Be wise, too extreme users generation process can make your machine stuck or even Halt the server side!
Writers come slower that Readers!
Do not forget to collect Hardware metrics using Telegraf or PerfMon.

And remember about conclusions.

!!! NOTICE !!! If you are hesitating on conclusions - generate reports and compare them. This will definitely help!