Closed sk92129 closed 9 months ago
- task: FlutterCommand@0
displayName: 'Flutter Command - Run tests'
inputs:
projectDirectory: .
arguments: 'test --coverage --file-reporter \"json:tests.output\"'
C:\Windows\system32\cmd.exe /D /S /C "D:\BuildAgentMobileWeb_work_tool\Flutter\3.16.3\windows\flutter\bin\flutter.bat test --coverage --file-reporter "\""json:tests.output\""""
Couldn't parse --file-reporter "\"json:tests.output\"": "\"json" is not a supported reporter
removed the quotes and escape chars. then it seems to work.
flutter.bat test --coverage --file-reporter json:tests.output
To get flutter to be fully integrated with sonarqube, this article specifies that the output from the flutter tests need to be put into a file named tests.output.
https://medium.com/@meaghosh/static-code-analysis-with-sonarqube-with-flutter-11a74beb9950
flutter.bat test --coverage --machine > tests.output
I tried adding the > into the Test task but could not get the task to handle that special character correctly.
Then I tried with the Command task, but encountered the similar problem. Any ideas?
If I leave off the > tests.output in the test step, then the sonarqube scanner indicates that it was not able to locate that tests.output file.