Day85 of #100DaysOfCode

Day85 of #100DaysOfCode

Hii folks 🙌

Today I will be continuing the same pathway in which we will test our own app Project: Lunch Tray app

Unit 3: Navigation

Pathway 3: Advanced navigation app Examples

Project: Lunch Tray app

We will clone that app from the GitHub in our Android Studio and set it up and then run the test cases.

The Lunch Tray project contains an “androidTest” target with several test cases: MenuContentTests, NavigationTests, and OrderFunctionalityTests.

Running your tests

To run our tests, we can do one of the following:

  • For a single test case, open up a test case class and click the green arrow to the left of the class declaration. We can then select the Run option from the menu. This will run all of the tests in the test case.
  • Often we’ll only want to run a single test, for example, if there’s only one failing test and the other tests pass.
  • If we have multiple test cases, we can also run the entire test suite. Just like running the app, we can find this option on the Run menu.
  • Note that Android Studio will default to the last target that we ran (app, test targets, etc.) so if the menu still says Run > Run ‘app’, we can run the test target, by selecting Run > Run.

Then choose the test target from the popup menu.

That is all for Day85 ✅

Thanks for reading, See you tomorrow!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store