Wiki

Versión 6 (Emilio Penna, Martes, 27 de Setiembre de 2022 17:41:00 -0300)

1 1
h1. Wiki
2 1
3 6 Emilio Penna
Currently, this page has information about moodle quiz load tests.
4 2 Emilio Penna
5 1
6 6 Emilio Penna
h2. Files for load tests
7 1
8 6 Emilio Penna
Attached, in the end of this page, there are the following files:
9 2 Emilio Penna
10 1
11 6 Emilio Penna
* Moodle quiz backup
12 6 Emilio Penna
* Test users file, for enrollment in the test course
13 6 Emilio Penna
* Jmeter script for load test (jmx)
14 6 Emilio Penna
* Users file for jmeter script
15 6 Emilio Penna
* Image with upload options for users import in moodle
16 2 Emilio Penna
17 1
18 6 Emilio Penna
h2. Configuration of the jmeter script
19 2 Emilio Penna
20 2 Emilio Penna
21 6 Emilio Penna
(The script was tested with jmeter 5.4.1)
22 2 Emilio Penna
23 6 Emilio Penna
The script uses plugins, so the plugins-manager.jar is required. It can be downloaded from https://jmeter-plugins.org/install/Install/ and put in the lib/ext directory of jmeter (jmeter restart required).
24 2 Emilio Penna
25 6 Emilio Penna
The parameters for the test are:
26 2 Emilio Penna
27 6 Emilio Penna
1. In "Configuracion del CSV dataset" you have to set the path and name of the users file (usuarios5000.csv)
28 6 Emilio Penna
2. In "plan de pruebas", you have to configure the course id, quiz id and server url.
29 6 Emilio Penna
3. In "valores por defecto para peticion HTTP" set the server url
30 6 Emilio Penna
 servidor
31 2 Emilio Penna
32 6 Emilio Penna
In  "grupo de hilos original" the threads number and ramp up time can be specified. Start with only 1 thread until the test run with no errors, then try more threads, in an incremental way. In our test we used, up to 2500 threads with a 180 seconds ramp up.
33 1
34 6 Emilio Penna
TO DO: The script has "Assertions" for controlling that the server response is what we expect in a successful execution, it works inspecting the html in the response with a pre defined text. We used, for example "Pagina 1 de 8", a text that appears in the bottom of the quiz pages. This text is in spanish, so it works if the language for the users is spanish.
35 6 Emilio Penna
For doing that you can set  lang="es" in the mdl_user table, with an update mdl_user set lang='es' where username like 'prueba%';
36 2 Emilio Penna
37 2 Emilio Penna
38 1
39 2 Emilio Penna
h2. Comentarios sobre las pruebas
40 2 Emilio Penna
41 4 Emilio Penna
Para correr el script, hemos observado que el máximo son unos 1500-2000uv por cliente (pc que ejecuta el script y envia los pedidos), si la exigen demasiado les va a dar errores pero puede ser porque el cliente no lo soporta, en ese caso hay que ejecutar en más de un cliente.
42 2 Emilio Penna
43 2 Emilio Penna
44 2 Emilio Penna
Para correr por linea de comando: 
45 2 Emilio Penna
46 2 Emilio Penna
<pre>
47 2 Emilio Penna
$ ./jmeter -n -t /home/epenna/moodle-quiz3-v1.jmx -l /home/epenna/jmeterout.jtl
48 2 Emilio Penna
</pre>
49 2 Emilio Penna
50 2 Emilio Penna
51 2 Emilio Penna
h2. PENDIENTES
52 2 Emilio Penna
53 3 Emilio Penna
* tema assertion, ver alternativa independiente del idioma