0
0
Testing Fundamentalstesting~10 mins

Test management tools (Jira, TestRail) in Testing Fundamentals - Test Execution Trace

Choose your learning style9 modes available
Test Overview

This test checks if a tester can successfully create a new test case in a test management tool (like Jira or TestRail) and verify that it appears in the test case list.

Test Code - Selenium
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 unittest

class TestCreateTestCase(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Chrome()
        self.driver.get('https://example-testmanagement.com/login')
        self.wait = WebDriverWait(self.driver, 10)

    def test_create_test_case(self):
        driver = self.driver
        wait = self.wait

        # Login
        username = wait.until(EC.presence_of_element_located((By.ID, 'username')))
        username.send_keys('tester')
        password = driver.find_element(By.ID, 'password')
        password.send_keys('password123')
        login_button = driver.find_element(By.ID, 'login-btn')
        login_button.click()

        # Wait for dashboard
        wait.until(EC.presence_of_element_located((By.ID, 'dashboard')))

        # Navigate to Test Cases section
        test_cases_tab = driver.find_element(By.ID, 'test-cases-tab')
        test_cases_tab.click()

        # Click 'Add Test Case'
        add_button = wait.until(EC.element_to_be_clickable((By.ID, 'add-test-case-btn')))
        add_button.click()

        # Fill test case form
        title_input = wait.until(EC.presence_of_element_located((By.ID, 'test-case-title')))
        title_input.send_keys('Verify login functionality')
        description_input = driver.find_element(By.ID, 'test-case-description')
        description_input.send_keys('Test that user can login with valid credentials')

        # Save test case
        save_button = driver.find_element(By.ID, 'save-test-case-btn')
        save_button.click()

        # Verify test case appears in list
        test_case_list = wait.until(EC.presence_of_element_located((By.ID, 'test-case-list')))
        test_case_titles = test_case_list.find_elements(By.CLASS_NAME, 'test-case-title')
        titles = [t.text for t in test_case_titles]
        self.assertIn('Verify login functionality', titles)

    def tearDown(self):
        self.driver.quit()

if __name__ == '__main__':
    unittest.main()
Execution Trace - 9 Steps
StepActionSystem StateAssertionResult
1Test starts and opens browserBrowser window opens at login page https://example-testmanagement.com/login-PASS
2Finds username and password fields, enters credentials, clicks loginLogin form filled with username 'tester' and password, login button clicked-PASS
3Waits for dashboard page to loadDashboard page visible with element ID 'dashboard'Check presence of dashboard elementPASS
4Clicks on 'Test Cases' tabTest Cases section displayed-PASS
5Clicks 'Add Test Case' buttonTest case creation form appearsCheck 'Add Test Case' button is clickablePASS
6Fills in test case title and descriptionForm fields filled with title 'Verify login functionality' and description-PASS
7Clicks 'Save' button to create test caseTest case saved and form closes-PASS
8Verifies new test case appears in test case listTest case list shows 'Verify login functionality' among titlesAssert 'Verify login functionality' is in test case titles listPASS
9Test ends and browser closesBrowser window closed-PASS
Failure Scenario
Failing Condition: New test case does not appear in the test case list after saving
Execution Trace Quiz - 3 Questions
Test your understanding
What action confirms that the test case was successfully created?
AThe new test case title appears in the test case list
BThe login button is clicked
CThe dashboard page loads
DThe add test case button is clicked
Key Result
Always verify that the test waits for page elements to load before interacting, and confirm that the expected data appears after actions to ensure the test case creation works end-to-end.