Closed k0pernicus closed 8 years ago
Instead of instrumenting the app, can't we instrument the scenario to automatically log actions on the app with timestamps in order to make such a correlation a posteriori?
One solution is to output a basic text file for each Calabash feature, which contains the name of the method called and the timestamp of this call. With this file, as the tests are complete, it can be possible to correlate each measure with the good action...
The second option is to build an other software which receive Calabash and LightPowertool calls to merge them into a single file - using NodeJS for example.
The second option has been choosen.
I implement a web server with Python to communicate with LightPowertool and Calabash - it's working and merge efficiently both timelines.
To know which method is consuming more or less energy, we have to correlate both scenario and output (from lightpowertool) timelines.
I think that can be done by separate scenarios from an existing feature (for Calabash especially), and just write a single scenario per Calabash feature.
With this solution, as soon as a feature/scenario is over, lightpowertool will stop his execution.
Unfortunately, a grained approach is not possible with existing tools...