Sobes.tech
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:

  1. Field validation:

    • Verify that the "name" and "password" fields are mandatory.
    • Check length and format restrictions (if any).
    • Test behavior when entering incorrect data.
  2. 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.
  3. UI/UX:

    • Verify correct display of elements on different devices and orientations.
    • Ensure the keyboard appears and hides correctly.
  4. Security:

    • Verify that the password is hidden during input.
    • Check protection against SQL injections and other vulnerabilities.
  5. 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()));
How will you test the login page of a mobile… - sobes.tech