Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to generate test cases in flutter #92

Open
sandeepgurram opened this issue Jun 9, 2024 · 1 comment
Open

Unable to generate test cases in flutter #92

sandeepgurram opened this issue Jun 9, 2024 · 1 comment
Assignees

Comments

@sandeepgurram
Copy link

Command

  --source-file-path '/Users/sandeepgurram/Documents/codebase/turing-gorout/gr_ui/common_ui/lib/ui/snackbar/gr_snackbar.dart' \
  --test-file-path '/Users/sandeepgurram/Documents/codebase/turing-gorout/gr_ui/common_ui/test/snackbar/gr_snackbar_test.dart' \
  --code-coverage-report-path '/Users/sandeepgurram/Documents/codebase/turing-gorout/gr_ui/common_ui/coverage/coverage.xml' \
  --test-command "flutter test --coverage" \
  --coverage-type "lcov" 

Error

2024-06-10 02:15:41,128 - cover_agent.UnitTestGenerator - INFO - Running build/test command to generate coverage report: "flutter test --coverage"
2024-06-10 02:15:43,719 - cover_agent.UnitTestGenerator - ERROR - Error in coverage processing: Fatal: The coverage report file was not updated after the test command. file_mod_time_ms: 1717965894440, time_of_test_command: 1717965941128. False
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/cover-agent", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cover_agent/main.py", line 94, in main
    agent = CoverAgent(args)
            ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cover_agent/CoverAgent.py", line 20, in __init__
    self.test_gen = UnitTestGenerator(
                    ^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cover_agent/UnitTestGenerator.py", line 75, in __init__
    self.run_coverage()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cover_agent/UnitTestGenerator.py", line 144, in run_coverage
    coverage_processor.process_coverage_report(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cover_agent/CoverageProcessor.py", line 49, in process_coverage_report
    self.verify_report_update(time_of_test_command)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/cover_agent/CoverageProcessor.py", line 70, in verify_report_update
    file_mod_time_ms > time_of_test_command
AssertionError: Fatal: The coverage report file was not updated after the test command. file_mod_time_ms: 1717965894440, time_of_test_command: 1717965941128. False
@EmbeddedDevops1
Copy link
Collaborator

Lcov is currently not supported. Feel free to iether use Cobertura or propose a new PR using docs/Add_New_Coverage_Type_Instructions.md as a guideline.

@EmbeddedDevops1 EmbeddedDevops1 self-assigned this Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants