How Do You Write Junit Test Cases for Android?
Contents How Do You Start Writing Junit Test Cases? Write the Test Case Package Com. Javatpoint. Testcase; Import Static Org. Junit. Assert. *; Import Com...
Contents
How do you start writing JUnit test cases?
Write the test case
- package com.javatpoint.testcase;
- import static org.junit.Assert.*;
- import com.javatpoint.logic.*;
- import org.junit.Test;
- public class TestLogic {
- @Test.
- public void testFindMax(){
- assertEquals(4,Calculation.findMax(new int[]{1,3,4,2}));
How do you write test cases for Android Apps?
Tips to Write Test Cases for Android Application
- Test cases should be written in such a way that they allow a person to test only one feature at a time.
- One should not overlap or complicate test cases.
- Cover all the positive and negative probabilities of the test outcomes.
23 сент. 2017 г.