Before explaining how to write the scripts for the performance test plan described before, it is necessary to introduce the framework which is going to be used for performance testing.
mechanize is a Python package providing a stateful programming web browser.
Namely, it provides an API which allows to simulate what an user performs through a web browser by writing Python code.
For example, it allows to open an URL, get the response, fill and submit forms, as well as supporting browser history and cookies.
The Python package zope.testbrowser is actually an abstraction of mechanize with a special focus on testing by measuring the elapsed time and pystones for each request. Besides of that, it also provides a nice and easy to use object model for forms and links.
The Python package z3c.etestbrowser extends zope.testbrowser by allowing to parse an HTML page as an elements tree and use XPATH for example to easily selects elements within an HTML or XML document. It also provides HTML and XML normalisation to display such contents in a readable way.
erp5.utils.test_browser only provides helpers specific to ERP5, such as selecting an ERP5 module, a favourite, copying and pasting previously selected objects, or getting the number of remaining activities.
However, note that Javascript is not supported (because it would require a Javascript engine), which could be circumvented by calling the target URL of Javascript code for example. Anyhow, Javascript testing is more related to functional testing and could be performed with Windmill or Selenium for example