bamlab / flashlight

📱⚡️ Lighthouse for Mobile - audits your app and gives a performance score to your Android apps (native, React Native, Flutter..). Measure performance on CLI, E2E tests, CI...
https://docs.flashlight.dev
MIT License
1.1k stars 27 forks source link

--skipRestart is causing issue, test runs not getting completed #297

Open dipak-amber opened 1 week ago

dipak-amber commented 1 week ago

flashlight test \ --bundleId com.amberstudent \ --beforeAllCommand "maestro test /users/dipakkorde/desktop/AppPerfScripts1/SetupHomeToSearch.yml" \ --testCommand "maestro test /users/dipakkorde/desktop/AppPerfScripts1/NavHomeToSearch.yml" \ --resultsFilePath /users/dipakkorde/desktop/results/resulthometosearch.json \ --skipRestart

While running tests using this runs not getting completed. Getting error

/snapshot/flashlight-cloud/flashlight-open-source/packages/platforms/android/dist/src/commands/atrace/pollFpsUsage.js:11 throw new Error(Could not parse ATrace line "${line}"); ^

Error: Could not parse ATrace line "CPU:2 [LOST 1457 EVENTS]" at parseLine (/snapshot/flashlight-cloud/flashlight-open-source/packages/platforms/android/dist/src/commands/atrace/pollFpsUsage.js:11:19) at FrameTimeParser.getFrameTimes (/snapshot/flashlight-cloud/flashlight-open-source/packages/platforms/android/dist/src/commands/atrace/pollFpsUsage.js:75:105) at /snapshot/flashlight-cloud/flashlight-open-source/packages/platforms/android/dist/src/commands/pollPerformanceMeasures.js:30:74 at /snapshot/flashlight-cloud/flashlight-open-source/packages/platforms/android/dist/src/commands/cppProfiler.js:48:9 at /snapshot/flashlight-cloud/flashlight-open-source/packages/platforms/android/dist/src/commands/shell.js:84:13 at Array.forEach () at Socket. (/snapshot/flashlight-cloud/flashlight-open-source/packages/platforms/android/dist/src/commands/shell.js:83:33) at Socket.emit (node:events:537:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9)

Node.js v18.5.0

Instead when i am running tests using

flashlight test \
--bundleId com.amberstudent \ --beforeAllCommand "maestro test /users/dipakkorde/desktop/AppPerfScripts/SetupFlow.yml" \ --testCommand "maestro test /users/dipakkorde/desktop/AppPerfScripts/ScrollSearchPage.yml" \ --resultsFilePath /users/dipakkorde/desktop/results/resulthometosearch.json

All iterations getting completed.

Almouro commented 5 days ago

@dipak-amber this might have been mitigated with #295, can you try again with the latest flashlight?

You should be able to upgrade with curl https://get.flashlight.dev | bash