Bird
Raised Fist0
Testing Fundamentalstesting~15 mins

Why non-functional quality affects user experience in Testing Fundamentals - Automation Benefits in Action

Choose your learning style10 modes available
Verify application responsiveness and error handling to ensure good user experience
Preconditions (2)
Step 1: Open the application login page
Step 2: Enter valid username and password
Step 3: Click the login button
Step 4: Measure the time taken for the dashboard page to load
Step 5: Simulate a slow network connection and repeat login
Step 6: Trigger an invalid input error by entering wrong data in a form field
Step 7: Observe the error message displayed
Step 8: Check if the application recovers gracefully after the error
✅ Expected Result: The dashboard loads within acceptable time limits under normal and slow network conditions. Error messages are clear and user-friendly. The application recovers without crashing or freezing, maintaining a smooth user experience.
Automation Requirements - Selenium with Python
Assertions Needed:
Dashboard page loads within 3 seconds under normal network
Dashboard page loads within 6 seconds under simulated slow network
Error message is displayed and contains user-friendly text
Application remains responsive after error
Best Practices:
Use explicit waits to handle page loading
Use Page Object Model to organize locators and actions
Avoid hardcoded sleep statements
Use assertions that check both presence and content of messages
Simulate network conditions using browser devtools or proxy
Automated Solution
Testing Fundamentals
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time

class LoginPage:
    def __init__(self, driver):
        self.driver = driver
        self.username_input = (By.ID, 'username')
        self.password_input = (By.ID, 'password')
        self.login_button = (By.ID, 'loginBtn')

    def login(self, username, password):
        self.driver.find_element(*self.username_input).clear()
        self.driver.find_element(*self.username_input).send_keys(username)
        self.driver.find_element(*self.password_input).clear()
        self.driver.find_element(*self.password_input).send_keys(password)
        self.driver.find_element(*self.login_button).click()

class DashboardPage:
    def __init__(self, driver):
        self.driver = driver
        self.dashboard_header = (By.ID, 'dashboardHeader')

    def is_loaded(self):
        return WebDriverWait(self.driver, 10).until(
            EC.visibility_of_element_located(self.dashboard_header)
        )

class FormPage:
    def __init__(self, driver):
        self.driver = driver
        self.input_field = (By.ID, 'inputField')
        self.submit_button = (By.ID, 'submitBtn')
        self.error_message = (By.ID, 'errorMsg')

    def enter_invalid_data(self):
        self.driver.find_element(*self.input_field).clear()
        self.driver.find_element(*self.input_field).send_keys('invalid_data!')
        self.driver.find_element(*self.submit_button).click()

    def get_error_message(self):
        return WebDriverWait(self.driver, 5).until(
            EC.visibility_of_element_located(self.error_message)
        ).text


def test_application_responsiveness_and_error_handling():
    options = webdriver.ChromeOptions()
    # Enable network throttling via DevTools protocol
    driver = webdriver.Chrome(options=options)
    driver.get('https://example-app.com/login')

    login_page = LoginPage(driver)
    dashboard_page = DashboardPage(driver)
    form_page = FormPage(driver)

    # Normal network test
    start_time = time.time()
    login_page.login('testuser', 'password123')
    dashboard_page.is_loaded()
    load_time_normal = time.time() - start_time

    assert load_time_normal <= 3, f'Dashboard load time too high: {load_time_normal}s'

    # Simulate slow network (example using Chrome DevTools Protocol)
    driver.execute_cdp_cmd('Network.enable', {})
    driver.execute_cdp_cmd('Network.emulateNetworkConditions', {
        'offline': False,
        'latency': 2000,  # 2 seconds latency
        'downloadThroughput': 500 * 1024 / 8,  # 500 kbps
        'uploadThroughput': 500 * 1024 / 8
    })

    driver.get('https://example-app.com/login')
    start_time = time.time()
    login_page.login('testuser', 'password123')
    dashboard_page.is_loaded()
    load_time_slow = time.time() - start_time

    assert load_time_slow <= 6, f'Dashboard load time too high under slow network: {load_time_slow}s'

    # Reset network conditions
    driver.execute_cdp_cmd('Network.disable', {})

    # Test error handling
    driver.get('https://example-app.com/form')
    form_page.enter_invalid_data()
    error_text = form_page.get_error_message()

    assert 'invalid' in error_text.lower(), 'Error message not user-friendly or missing'

    # Check application responsiveness after error
    try:
        driver.find_element(*form_page.input_field).is_enabled()
        responsive = True
    except Exception:
        responsive = False

    assert responsive, 'Application not responsive after error'

    driver.quit()

This test script uses Selenium with Python to automate the manual test case steps.

We define Page Object classes for the login page, dashboard, and form page to keep locators and actions organized and reusable.

The test function opens the login page, performs login, and measures the time taken for the dashboard to load using explicit waits to ensure the page is ready.

It asserts that the load time is within acceptable limits under normal and simulated slow network conditions. Network throttling is done using Chrome DevTools Protocol commands.

Then it navigates to a form page, enters invalid data to trigger an error, and verifies the error message is displayed and user-friendly.

Finally, it checks that the application remains responsive after the error by verifying the input field is enabled.

Explicit waits avoid flaky tests, and assertions check both timing and content to ensure good user experience related to non-functional quality.

Common Mistakes - 5 Pitfalls
Using time.sleep() instead of explicit waits
Hardcoding XPath locators that are brittle
Not simulating network conditions for performance testing
Not verifying error message content
Not checking application responsiveness after errors
Bonus Challenge

Now add data-driven testing with 3 different user credentials and invalid inputs to verify consistent behavior.

Show Hint

Practice

(1/5)
1. Which of the following is an example of a non-functional quality that affects user experience?
easy
A. The color scheme used in the user interface
B. The number of features available in the software
C. How fast the software responds to user actions
D. The programming language used to build the software

Solution

  1. Step 1: Understand non-functional qualities

    Non-functional qualities describe how software performs, like speed or security, not what it does.
  2. Step 2: Identify the example related to performance

    Speed of response is a classic non-functional quality affecting user experience.
  3. Final Answer:

    How fast the software responds to user actions -> Option C
  4. Quick Check:

    Non-functional quality = speed [OK]
Hint: Non-functional = how software works, not what it does [OK]
Common Mistakes:
  • Confusing features (functional) with qualities (non-functional)
  • Thinking UI colors are always non-functional
  • Assuming programming language affects user experience directly
2. Which statement correctly describes a non-functional requirement in software testing?
easy
A. It defines the system's performance and security standards.
B. It specifies the exact steps a user must follow to complete a task.
C. It lists all the features the software must have.
D. It describes the programming language syntax used.

Solution

  1. Step 1: Recall what non-functional requirements are

    They describe qualities like performance, security, usability, not specific features or steps.
  2. Step 2: Match the correct description

    Performance and security standards fit non-functional requirements perfectly.
  3. Final Answer:

    It defines the system's performance and security standards. -> Option A
  4. Quick Check:

    Non-functional requirement = performance/security [OK]
Hint: Non-functional = qualities like speed and security [OK]
Common Mistakes:
  • Confusing functional steps with non-functional requirements
  • Thinking programming language details are requirements
  • Mixing features with quality standards
3. Consider this scenario: A website loads slowly and sometimes crashes under heavy traffic. Which non-functional qualities are most affected?
medium
A. Usability and maintainability
B. Performance and reliability
C. Security and accessibility
D. Functionality and compatibility

Solution

  1. Step 1: Identify the issues described

    Slow loading relates to performance; crashing relates to reliability.
  2. Step 2: Match issues to non-functional qualities

    Performance means speed; reliability means stability under load.
  3. Final Answer:

    Performance and reliability -> Option B
  4. Quick Check:

    Slow + crash = performance + reliability [OK]
Hint: Slow and crash? Think performance and reliability [OK]
Common Mistakes:
  • Confusing usability with performance
  • Mixing security with crashing issues
  • Assuming functionality covers speed problems
4. A software tester notices that users complain about confusing navigation and frequent security warnings. Which non-functional qualities should the tester focus on improving?
medium
A. Compatibility and functionality
B. Performance and scalability
C. Reliability and maintainability
D. Usability and security

Solution

  1. Step 1: Analyze user complaints

    Confusing navigation relates to usability; security warnings relate to security.
  2. Step 2: Identify matching non-functional qualities

    Usability means ease of use; security means protection from threats.
  3. Final Answer:

    Usability and security -> Option D
  4. Quick Check:

    Navigation + warnings = usability + security [OK]
Hint: Confusing UI + warnings = usability and security [OK]
Common Mistakes:
  • Focusing on performance instead of usability
  • Ignoring security warnings as minor issues
  • Mixing functionality with usability
5. A mobile app has excellent features but users report it drains battery quickly and often freezes. How should the development team prioritize non-functional testing to improve user experience?
hard
A. Focus on battery usage and stability tests before adding new features
B. Add more features to distract users from battery issues
C. Ignore battery issues and focus on UI design only
D. Test only security since freezing is unrelated to performance

Solution

  1. Step 1: Understand user complaints impact

    Battery drain affects usability and user satisfaction; freezing affects reliability and stability.
  2. Step 2: Decide testing priorities

    Improving battery usage and stability directly improves user experience before adding features.
  3. Step 3: Eliminate incorrect options

    Adding features or ignoring battery issues worsens experience; freezing relates to performance, not just security.
  4. Final Answer:

    Focus on battery usage and stability tests before adding new features -> Option A
  5. Quick Check:

    Battery + freeze = test usage + stability first [OK]
Hint: Fix battery and freezing issues before new features [OK]
Common Mistakes:
  • Prioritizing new features over fixing core issues
  • Ignoring battery drain as unimportant
  • Misunderstanding freezing as only a security problem
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard