October 2024
New features
This month, Greenspector is proud to announce that the Greenspector Studio API is now available. With this API, Greenspector strengthens its ability to integrate into many tools used by its customers (CI/CD platform, dashboard KPI … ).
Greenspector Studio - new interface
As a user, I would like to have a new page to follow the evolution of the ecoscore and the different metrics of the versions of my analysis
As a user, I want to use a swagger to test Greenspector Studio API. When you are connected to the interface, the swagger can be used without any other authentication.
As a user, I can create API tokens and I can see shared tokens of my organization.
When you create a token, you actually have two separate tokens created. Indeed, for the moment, Greenspector has two APIs which do not share the same system. The two tokens are :
an API token to access the new Greenspector Studio API with tools like curl, postman …
an API token to access the measuring workshop API with tools like curl, postman … and that you can use with Greenspector CLI to launch measure in CI / CD platform
As an admin, I can create an API token that I can share with everyone in my organization or share only with admins.
Power Test Bench & Test Runner
As a user, I would like to have more details about the network requests that occurred during the measurement steps. A json file networkPacketsResults.json is now available in the tests-results folder if the tcpdump module is enabled. It contains the IP adresses of the servers contacted with the volume of data exchanged.
Example:
{
"application": "TestBP",
"version": "test-S7TCPDUMP",
"deviceName": "sm-g930f",
"iterations": [
{
"iterationID": "1",
"steps": [
{
"stepName": "CHRGT_animationsCSS",
"timestampStart": 1720617592580,
"timestampEnd": 1720617594208,
"dataVolume": 1823,
"servers": {
"51.255.194.216": {
"serverName": "dl.greenspector.com",
"serverIP": "51.255.194.216",
"dataVolume": 1823
}
}
},
{
"stepName": "PAUSE_animationsCSS",
"timestampStart": 1720617596418,
"timestampEnd": 1720617625921,
"dataVolume": 1621,
"servers": {
"142.250.178.138": {
"serverName": "findmydevice-pa.googleapis.com",
"serverIP": "142.250.178.138",
"dataVolume": 337
},
"142.250.74.234": {
"serverName": "securitydomain-pa.googleapis.com",
"serverIP": "142.250.74.234",
"dataVolume": 685
},
"216.239.38.223": {
"serverName": "play.googleapis.com",
"serverIP": "216.239.38.223",
"dataVolume": 271
},
"8.8.8.8": {
"serverName": "unknown",
"serverIP": "8.8.8.8",
"dataVolume": 164
}
}
}
]
}
]
}
Test Runner
As a user, I can use the Test Runner to launch measurement on my local device and retrieve results in the new Greenspector Studio web interface. I only need to put
online: true
to my job.yml file. I can also see my job in the measuring workshop web interface, in the “Tests tracking” tab.
API
As a user, I can generate an API token to call new Greenspector studio API with curl or any other tools.
For example, to list all analysis, you can call this example by replacing XXXX by your API token
curl -X 'GET' \
'http://saas.greenspector.com/api/v1/applications' \
-H 'accept: application/json' \
-H 'Authorization: Bearer XXXX'
Improvements
GDSL for ios
There are 4 new gdsl functions:
findByClass
findByText
findByTextExact
clickOnLastElementFound
The findByClass function allows to find an element thanks to its class from the dump file. You can add a second parameter to specify the rank of the element. By default, the first rank is used. You can also add a third parameter to detect elements with the enabled field set to true or false. By default, this parameter is set to true. Then, to click on the element, you can use the clickOnLastElementFound function.
Example of a gdsl script to click on the third element with the TextField class and the enabled field set to true:
findByClass,TextField,3,true
clickOnLastElementFound
Bug fixes
Greenspector Studio - new interface
Fixes an error that occurred when creating a benchmark of a mobile application
Fixes issue where user was not an admin of their organization when signing up
Fixes total measurement time not equal to the sum of intermediate measurement times. Deleted applications were not included in intermediate measurement times.
Fixes measurement time display
Test Runner
Fixes a bug linked to the new version of tcpdump (4.99.1). With this version, if we don't have the rights to run tcpdump without sudo, the "tcpdump --version" command doesn't work. Now, we check for the tcpdump rights before checking the version.
Greenspector CLI
Fixes an error that occurred when using the app parameter with a file path relative to the current directory without using the path separator “./”. For example
--app ./file.apk
worked while--app file.apk
did not.
Documentation changes
API documentation with examples with curl and postman Greenspector Studio API