testcase - How to write integration test cases for the two activities in android -
Actually I am new to testing here and here I am running with integration testing for two activities.
Code below:
Public Sector Main Activity Functionality Extends Extension Extension Tasks 2 & lt; Main activity & gt; {Private key activity activity; Public main activity features () {super (main activity category); } @ Override secured zero setup () throws exception {super.setUp (); SetActivityInitialTouchMode (wrong); Activity = getActivity (); } Public Zero testStartSecondActivity () Adds the exception {// monitor to the second activity activity Monitor Monitor = getInstrumentation (), throws the monitor. AddMonitor (secondactivity.clash.gatename (), empty, incorrect); // Find button and click on the button = (button) Activity. FindVibIID (R.B. button1); // TouchTools handles sync with the main thread manually. ClickClickView (this, view) handles; // Click to click on, e.g., a listview // listView.getChildAt (0); // Wait for 2 seconds for the onset of activity. Second Activity Start = (second activation) monitor. WaitForActivityWithTimeout (2000); AssertNotNull (startedActivity); // Search for text. See TextView Text View = (TextView) Initially. SplitVUBIID (RID Reset Text); // Check that the TextView is on the screen ViewAsserts.assertOnScreen (startActivity.getWindow). GetDecorView (), textView); // TextView assertEquals validate text ("text incorrect", "start", text view .gettext () .toString ()); // Press back and then click on this. SendKeys (KeyEvent.KEYCODE_BACK); TouchUtils.clickView (see, this); }} The second call that calls down gives me zero-pointer error Trying to do a lot to correct how another activity can get value, but a Remains the same.
Second Activity Start = (Second Activation) Monitor. Weight-activeactive timetable (2000);
If anyone knows about this then please help me.
Comments
Post a Comment