Closed manuelplazaspalacio closed 11 months ago
com.github.AppDevNext.Logcat:LogcatCoreLib library deleted due to compatibility issues with the app tests.
QA checks
Will compare request/responses caught with mitmproxy with the same ones in the logs. They must be identical:
Let's QA this one
Name of the file is not re-generated?
Logging
owncloud.2023-11-17_08.35.34.log
Current: log file name is the same: owncloud.2023-11-17_08.35.34.log
Expected: new log file with different timestamp
Pixel 2 Android11
94c9fbafc
I generate a log file including several operations, i will comment some issues about that:
owncloud.2023-11-17_08.56.03.log
I noticed that the response body scapes the quotation marks in the HTTP RESPONSE
: {"response":{"body":{"data":"{\"ocs\":{\"meta\":{\"status\"...
(line 229). Why is that required?
There are some lines with Operation finished with HTTP status code -1 (success)
(225, 289, 298...).
I noticed that some requests like avatar
(check line 143) lacks of body response in the JSON when it is empty. However, if response is empty, it's logged {"response":{"body":{"data":"","length":0}...
. Should be the same for both requests and responses?
In relation to the second QA report, related to the status code -1
, it is caused because the mHttpCode
variable has no value at this point and sets the default value, which is -1
.
When we have this case, where we have a resultCode.OK
, there is no condition in the getLogMessage
function that handles this case. Therefore, I would put one more condition for results with mCode == ResultCode.Ok
, putting a message like: successful response
.
putting a message like: successful response.
i don't get this point. Code statuses should not be replaced by strings, we are adding noises to the log. A "successful response" could be 200, 201, 207... is there no way to keep the code status?
putting a message like: successful response.
i don't get this point. Code statuses should not be replaced by strings, we are adding noises to the log. A "successful response" could be 200, 201, 207... is there no way to keep the code status?
I have seen that in other parts of the application the log is managed from the Operation
. For example, in GetUrlToOpenInWebRemoteOperation
the following timber is written: Timber.d("Open in web for file: $fileId - $status${if (!isSuccess(status)) "(FAIL)" else ""}")
. Here the status will appear correctly. In any case, the solution shown above, code statuses are replaced by strings in all cases.
In any case, the solution shown above, code statuses are replaced by strings in all cases.
It shouldn't be like that. We're losing information in such case.
About (1), not sure if directly related. Follow these steps:
Current: two files (entries) are generated. Expected: only one generated
Pixel 2 Android11
aa4448660
- I noticed that the response body scapes the quotation marks in the
HTTP RESPONSE
:{"response":{"body":{"data":"{\"ocs\":{\"meta\":{\"status\"...
(line 229). Why is that required?
Regarding the first QA bug, the method that parses the json responseJsonAdapter.toJson
is managed by the Moshi library, in this case we cannot do much, the library considers parsing the data in this way.
About (1), not sure if directly related. Follow these steps:
- Enable logs and do some operations to create a file (check a log file)
- In device settings, move date to the following day to create a new log file correspondent to that date
- Open the app and generate logs (at this point, we have 2 different log files)
- In logs view, remove the latest file and generate more files
Current: two files (entries) are generated. Expected: only one generated
Pixel 2 Android11
aa4448660
We are opened an issue to fix this:
I update the general outline of the PR:
[x] Fix 1: Related to tho name of the file is not re-generated. (Waiting QA approval)
[x] Fix 2:
- [x] Response body scapes the quotation marks. (answered in previous comment)
- [x] Lines with Operation finished with HTTP status code -1. (Waiting QA approval)
- [x] Some requests like avatar (check line 143) lacks of body response in the JSON when it is empty. (Need more info)
[X] Two logs are created when no logs in screen and close and open app. (Created new issue)
Summarizing:
I noticed that the response body scapes the quotation marks in the HTTP RESPONSE: {"response":{"body":{"data":"{\"ocs\":{\"meta\":{\"status\"... (line 229). Why is that required?
won't fix
There are some lines with Operation finished with HTTP status code -1 (success) (225, 289, 298...).
fixed
I noticed that some requests like avatar (check line 143) lacks of body response in the JSON when it is empty. However, if response is empty, it's logged {"response":{"body":{"data":"","length":0}... . Should be the same for both requests and responses?
won't fix, let's take this as correct
Will get this as first approach, open to new improvements.
I'd go for a better formatting on the lines. Let's take a look to an iOS log:
ownCloud_28_Nov_2023_at_10_11_37.log.txt
seems to be more structured (beyond the specific json-format of reqa/resps). Wdyt?
Related Issues
App: https://github.com/owncloud/android/issues/4151
QA