Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..
396 views

TruWeb real time results

Hi, I'm currently having a look at the new TruWeb included with 12.6, particularly the standalone command line version. We like the idea of having something small and portable that we can include as part of a Jenkins pipeline. It means we can get performance results much earlier in the process.

However, I am having trouble with the results set, more specifically the option to review the results in real time. According to the documents the results are stored in a SQLite database, and I am able to open those files and review the results. It also says that the client should not be used to open the database as it will block the database for writing. To me this suggests that if I try and interrogate the database for a realtime view of response times, I will effectively block any new data being added to the database.

Is there a way of getting the results as they happen?

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: TruWeb real time results

Hello Simon,

Indeed the raw results are saved to the SQLite DB as you mentioned.

First I would like to ask if you tried comparing the DB file at the end of two executions - one you interrogated during the execution and one that you didn't.

The data might be there, but of course it is not the best practice.
Moreover, if your DB file gets stuck, your results will not be kept in the same location, which might impact your ability to use it in a pipeline.

On the other hand, I think that you can try a more 'programmer' approach where you can add 'self-checks' to your TruWeb script. In the Transactions tutorial video you can see an example of updating the transaction data at a specific point in the script before deciding if it should pass or fail, depending on the transaction time.
Of course, this is just an example.

The downside of this approach would be that your focus is from a specific user, not a whole run perspective.

Can you share more details about your use-case?
i.e. what are your scenario.yml configuration and pass/fail criteria.

Thank you for your feedback and question,
Gil Kedem

0 Likes
Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..

Re: TruWeb real time results

Trying the test with SQL browser still open on the database has several outcomes, the most common are either an empty DB or a completely different results folder (as you mentioned below). Neither of which are particularly effective for a pipeline.

For this work we're looking beyond merely pass/fail criteria, we're looking at options for presenting response times in graphical form during a performance test. Similar to what is seen in Controller or Performance Center. We have an instance of Prometheus combined with Grafana, it would be good if we could make the transaction response times available to Prometheus. Alternatively we have a MySQL instance also providing data to Grafana so being able to write the response times to MySQL would also work well.

If the DB had been accessible by multiple connections then we could have used a SQL query every five seconds or so to update the graphs. 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: TruWeb real time results

Thank you for your reply.

The purpose of the raw results DB is to provide a way to review the data after the test ended.
If you connect using another tool to it we cannot guarantee at this point that all the data will be available.
Moreover, you will need to make sure not to lock the DB file so that when the next execution starts it will clear the previous restults and create the new ones in the same folder.
If the file is locked - a new folder is created, as you have noticed already.

As you mentioned MySQL, you might try the mysqljs node module.
It says in their online documentation it is pure JavaScript, and if that is the case you could use 'require' in your TruWeb script and use it to write data to your custom.

In addition to that, Performance Center 12.60 allows you to execute TruWeb scripts, while it also exports online data to InfluxDB. This can give you another option for your intergration.

Plesae share your thoughts and feedback - if you choose any of the above options or any other option.

Best regards,
Gil Kedem

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.