Skip to content

TextToSpeech coverage#4812

Open
Piyush-Kumar-Mishra wants to merge 3 commits intokiwix:mainfrom
Piyush-Kumar-Mishra:tts-coverage
Open

TextToSpeech coverage#4812
Piyush-Kumar-Mishra wants to merge 3 commits intokiwix:mainfrom
Piyush-Kumar-Mishra:tts-coverage

Conversation

@Piyush-Kumar-Mishra
Copy link
Copy Markdown
Contributor

@Piyush-Kumar-Mishra Piyush-Kumar-Mishra commented Apr 9, 2026

FIX #4810

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.53%. Comparing base (fc45ebb) to head (65acd43).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4812      +/-   ##
============================================
+ Coverage     60.49%   60.53%   +0.03%     
  Complexity     1675     1675              
============================================
  Files           333      333              
  Lines         16020    16020              
  Branches       2225     2225              
============================================
+ Hits           9692     9698       +6     
+ Misses         4855     4850       -5     
+ Partials       1473     1472       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kelson42
Copy link
Copy Markdown
Collaborator

@Piyush-Kumar-Mishra I guess this is ready for review?

@Piyush-Kumar-Mishra
Copy link
Copy Markdown
Contributor Author

@kelson42 Yes, ready for review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial unit test coverage for KiwixTextToSpeech to address missing tests reported in #4810.

Changes:

  • Introduces KiwixTextToSpeechTest with Robolectric + MockK to validate key readAloud, stop, pauseOrResume, initWebView, shutdown, and TTSTask behaviors.
  • Adds test scaffolding for mocking AudioManager, TextToSpeech, and WebView interactions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/src/test/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeechTest.kt Outdated
Copy link
Copy Markdown
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Piyush-Kumar-Mishra, There are some changes @copliot suggested. Apart from that, please see the review changes.

@Piyush-Kumar-Mishra
Copy link
Copy Markdown
Contributor Author

Piyush-Kumar-Mishra commented Apr 15, 2026

Thank you for the review
I’ll check everything again and update the commit.

Copy link
Copy Markdown
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were some import issues(and commit cleanup). I have fixed both issues. @kelson42 Now, LGTM. Once CI is green, we can merge.

@kelson42
Copy link
Copy Markdown
Collaborator

CI is not green at all :(

@kelson42 kelson42 force-pushed the tts-coverage branch 2 times, most recently from 1a83f4e to ac95137 Compare April 18, 2026 00:56
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

Successfully merging this pull request may close these issues.

Add unit test for KiwixTextToSpeech

5 participants