One of the key features of ElasTest is the ability to show and analyze logs and metrics of all elements involved in a test. This is particularly interesting for end-to-end tests, which usually involve more complex system architectures in distributed environments. For example, suppose a typical three tier web application with a database. A basic e2e test has the following components: the test itself, web browser (or browsers!), web application and database. All those elements can generate logs and metrics of several types (CPU, memory, network packets…). When a test is executed using ElasTest, the tester can see all that monitoring information in the same graphical user interface and with advanced analysis features.
ElasTest monitoring service is based on event streams. Every log and metric entry is called an event. The collection of events containing information about the same metric or log is called event stream. Any SuT, TJob or Service can generate multiple event streams. All of them can be gathered and visualized by ElasTest on useful graphs in real time and stored for future reviewing.
For all TJobs and for all SuTs deployed by ElasTest, you will have available by default some useful logs and metrics. This is possible thanks to Docker features of logs and stats, that allow ElasTest to automatically gather monitoring information from the containers. Therefore, this is the easiest and quickest way to monitor your tests.
Monitoring user interface
ElasTest provides testers with a direct way of customizing their dashboards on TJob executions, so they can see only the metrics and logs that matter to them.
During any TJob execution, you can add so many logs and metrics you want by clicking the Monitoring Configuration button:
There you can find all the monitoring options available for that specific TJob execution. For example, for this TJob we are adding 3 different log streams:
- The default log of our SuT
- The default log of our test
- The browser's console (we are making use of ElasTest Web Browsers service)
And 3 different metrics for the container of our test:
- The CPU usage
- The memory usage
- The number of bytes received from the network per second
When clicking on Apply button, you will see one monitoring card for each selected option (a log card for each log and a chart card for each metric).
The available options depend exclusively on the configuration of your TJob:
If you want to save your current monitoring configuration for future executions of the same TJob, you just need to press "Apply and Save" button. Thus, each time you launch that TJob you will see the same logs and graphs. This can be useful for regression tests, as you can compare the same information from two diffrent executions of the same TJob.