I am executing test cases via the adb shell. For the first time it runs, but when I change the codes and rerun the commands of the shell, it gives results for previous tests that were created. How can I make the test run the current code via the adb shell after changes have been made.
adb shell am force-stop com.example.plainolnotes
adb push "C:\Users\Enoch\Downloads\Lynda\Ex_Files_NoteTaking_Android\Ex_Files_NoteTaking_Android\Exercise Files\06_Finalize\PlainOlNotes\app\build\outputs\apk\app-debug-androidTest.apk" /data/local/tmp/com.example.plainolnotes.test
adb shell pm install -r "/data/local/tmp/com.example.plainolnotes.test"
adb shell am instrument -w -r -e debug false -e class com.example.plainolnotes.MainActivityAutomatedTest com.example.plainolnotes.test/android.support.test.runner.AndroidJUnitRunner
These are the codes I execute in my adb shell and it is the same as android executes it in my console. Answers will be really appreciated.