Discipline: Scripts and Scenarios
Relationships
Main Description

In general, a script can be defined as a sequence of steps necessary to carry out a performance testing execution instance.
Scripts can be developed by programming languages, such as C, Java, Python, etc.
Another manner of obtaining scripts is through Capture \& Replay tools, which execute a certain functionality of the application to generate the scripts from that execution, which can imply a decrease in the level of complexity for the elaboration of the scripts, a the code is abstracted from the user.
However, this approach can generate excess code, or even some type of undesired code. Therefore, despite a higher level of complexity, the preparation of scripts manually can be very useful in a context where the team is proficient in the scripts language or even in cases where script changes are constantly needed.
Another important aspect to be highlighted, in relation to the scripts creation, is the possibility of scripts parametrization, that is, where through external files, the script execution parameters are dynamically changed.
Without this kind of functionality, performance testing becomes somewhat impractical.
The most available performance testing tools already allow the use of both, manual scripts and Capture \& Replay approaches, as well as the scripts parametrization.

A scenario can be defined as a specific context whose application functionality will be tested.
This context is composed by the workload, and the way that this load behaves, and also by the set of all characteristics inherent to that context.
For example, a load of 1000 initial users being incremented every 2 minutes in a product's purchase functionality through an application's shopping cart.
This scenario is formed by a set of one or more scripts that will be executed so that the projected objective is reached.
The scenarios must be thought in the initial phases of the test, more specifically in the planning and in the requirements domain, so that later in the phases of design and configuration this scenario is instantiated for its execution by scripts.