Script06iterations

SCRIPTING 06: DOING THE REPS (ITERATIONS)

Script repetitions

The main goal for a ‘load test automated script‘ is to do the same process several times again and again. In essence to be able to put some reps while working. Just like when you workout, you must repeat the same exercise many times to see the gains.

In the same way, after we have all the variables on the script, we must validate that the script can repeat several times without having errors. This is known as an iteration. In other words, the script must be able to iterate.

Many load scripters create scripts that fault on some iterations. When they run the test, they already expect to see some errors and warnings from the script. This means that the test is not the best. To avoid this problem and ensure the quality of our scripts, we must follow a process to get them in iterating shape. Just like a workout program, you will get in shape little by little and step by step.

FIRST DAY

First DayOften you will find people in the gym whom are new or haven’t been there in a long time. Most probably, they won’t be back soon because of over working. They will throw to the trash can the membership that they just payed, together with their plan for a better shape. Instead, to ensure that they have a long story of being in shape, they should start little by little. They should do some exercises only once at the beginning.

In the same way, we should just check that our script completes one run. Do just one process from start to end. Only then you will make sure that the script can complete a cycle without hurting himself. You will see if all the previous work we have done(Correlations, Data, etc.) completes at least once. Hurrah! If you can complete just one tiny run of a workout, you will be able to come back the next day to keep moving on.

GET USED TO THE REPS

You have passed the first repetition and you found out that you can do it with no pain. You feel comfortable that you have done a good job. Now, it is time to move on and do some repetitions.

Like your script, you will know it works once it completes an iteration. Then you have to make sure it can do more iterations. But as you are still a newbie on the workout scene, you must do the same exercise while you start doing reps.

I usually recommend to go from 3 to 5 iterations. At times I feel wild and let it run for 10 iterations. The difference for now will be that you will use the same variables on each iteration. Do not change anything and make sure you can do the reps. Easy there, don’t hurt yourself.

ADD VARIETY

varietyAfter you notice that without much problem you can do the same reps, it is time to add variety to work all of the muscle groups.

Doing the same was good exercise to get your body used to the activity. But now you want to ensure that you get more gains. So now you will cycle each body part on each rep. First work the biceps. After the guns are trained, move on to the chest. Then, you may work out the legs to not to look like Johnny Bravo. Even add  some yoga or stretching at the end. Then you will have a complete workout.

In the same way, we will add some change to the iterations. Again, we will do at least 3 to 5 reps. But this time we will change the variables on each iteration as we planned them to change.

By doing this we will get a double hit. First we will make sure that we can change through all the values and the cycle without breaking. Second, we will check that we configured the variables and the thing cycles in the right way.

DIVIDE THE WORKOUT

You need to divide the workout. First steps firs: do the warm up before you start doing the reps. Then do the reps as many times as you need in your workout program. And after you are done, make sure you stretch to cool down those muscles.

There will be times when you don’t need to divide the workout. Such as in some yoga sessions where you just do all of the stretching process all the time. In the same way in a script you may need to test the whole thing iterating. That would make this step useless.

Most of the time, the script has to divide its steps. Cut it on the initial piece with what a real user does once in the morning, like logging in. Then put the actions that will iterate during the day of a real life user. Then, at the end do the logoff processes. Such as real life to ensure that you get the best workout possible.

Although there are different opinions on when to do this step, some say you could do it after you did the simple reps step. I believe it should be done once you mastered variety. It is up to you.

REPEAT THE REPS

Once the workout is divided, we will need to do the reps again to get the best results.

Repeat the 3 to 5 iteration on your script after it is split in phases. Make sure that after the first iteration it can return to a safe start point to repeat the iteration again. If it fails, it must be that it is restarting at a point where it cannot do the steps again. If so, go back to the dividing step and check what can it be. Maybe you need to include an earlier screen that you left in the initial phase.

By doing this you make sure you are not warming up between reps, or doing an exercise at the beginning and forgetting it for the rest of the workout. Make your script to get the best gains and never throw errors nor warnings.

LONG REPS FOR LIFE

Now that you are used to the workout, you just have to keep doing it. You found that you created the perfect workout. Now it is time to make it a lifetime habit. You will be sexy for life ese!

Down the road you may notice that you get tired of it after some time. This will show you that you need to go back and change your routine. The goal is to make sure it is something that sticks forever.

The next step here is to leave your script running by itself for a given period of time. Forget the reps, now, this time we are in for duration. Put the script in the loading tool and let it run by itself for about 10 minutes so it does as many reps as it can. Here we will validate that the process is good iterating for long periods of time and make sure you can iterate a lot and that the process never fails. This will leave you with a bulletproof script that runs and runs like the battery bunny.

CLOSING

When you make sure that your script can do the needed reps without a problem you will have a script that is is fit and good.

You don’t want it quitting at the half of its way to a beach body. You will make sure that the script is strong enough to endure a zero error run if you follow these steps.

Make sure that you go through them every time that you are scripting to become a super scripter!

We have awesome steps now that assure that our script can do the reps. On the next post we will move to the concurrent check.

But for now, it is time to go. Vamonos!

To be continued

Besos <3

-Señor Performo