Middle
How will you test the login page of a mobile application with fields for name, password, and a button?
sobes.tech AI
Answer from AI
To test the login page of a mobile application with fields for name, password, and a button, the following aspects should be checked:
-
Field validation:
- Verify that the "name" and "password" fields are mandatory.
- Check length and format restrictions (if any).
- Test behavior when entering incorrect data.
-
Login button behavior:
- The button is active only when required fields are filled.
- Attempt login with correct data upon clicking.
- Display appropriate message on login failure.
-
UI/UX:
- Verify correct display of elements on different devices and orientations.
- Ensure the keyboard appears and hides correctly.
-
Security:
- Verify that the password is hidden during input.
- Check protection against SQL injections and other vulnerabilities.
-
Automation:
- Write UI tests using tools like Appium or Espresso.
Example of an automated test in Espresso (Android):
onView(withId(R.id.username)).perform(typeText("user"));
onView(withId(R.id.password)).perform(typeText("pass"));
closeSoftKeyboard();
onView(withId(R.id.login_button)).perform(click());
onView(withText("Welcome"))
.check(matches(isDisplayed()));