Skip to content

Demonstrating the unit testing of composable functions

Notifications You must be signed in to change notification settings

aqua30/ComposableUITesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComposableUITesting

Sample project to demonstrate unit testing of composable functions

Reference article

Testing Composable in Jetpack Compose Android - Testing Fundamentals

Screenshot

Test Screens

Testing scenarios

  • Initial state: Once we launch our activity, the first image would be our initial state with Start copying as the default text placed until we perform any click action on the Copy button. TextField remain empty with Input as label.
  • Invalid state: User can enter any input text but we're checking it for Int type. So, if the input is not a number and user clicks on the Copy button then we'll show Invalid entry in place of Start copying label.
  • Valid state: If user enter any number then we'll show the entered input along with text Counter = $input on click on Copy Button.

About

Demonstrating the unit testing of composable functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages