Software Testing - Lecture
Plan
Chapter 1: Introduction to Software Testing
- Lecture:
- Importance of software testing in ensuring quality and reliability.
- Overview of testing types: unit, integration, end-to-end, functional, non-functional, etc.
- Introduction to test management and its role in organizing testing efforts.
- Quiz: Multiple-choice questions on basic testing concepts (e.g., “What is the purpose of unit testing?”).
Chapter 2: Test Management with X-Ray and Zephyr in Jira
- Lecture:
- Setting up X-Ray and Zephyr in a Jira project.
- Creating and managing test cases, test sets, and test plans.
- Linking tests to requirements and tracking execution status.
- Lab:
- Set up a Jira project with X-Ray or Zephyr.
- Create 3-5 test cases (e.g., “Verify user login”) and organize them into a test set and plan.
- Quiz: Questions on test management tools (e.g., “How do you link a test case to a requirement in X-Ray?”).
Chapter 3: Unit Testing with Spring Boot
- Lecture:
- Introduction to JUnit (testing framework) and Mockito (mocking framework).
- Writing unit tests for Spring Boot services and controllers.
- Best practices: isolating units, mocking dependencies, and writing maintainable tests.
- Lab:
- Provided: A sample Spring Boot REST API with CRUD operations (e.g., managing a “Book” entity).
- Task: Write unit tests for the controller (e.g., test GET /books) and service (e.g., test book creation logic) using JUnit and Mockito.
- Quiz: Questions on unit testing (e.g., “What is the purpose of mocking in unit tests?”).
Chapter 4: Integration Testing with Spring Boot
- Lecture:
- Using Spring Boot Test to load the application context for integration testing.
- Testing REST APIs with Rest Assured for HTTP request validation.
- Verifying interactions between components (e.g., controller and service layers).
- Lab:
- Provided: The same Spring Boot REST API from Chapter 3.
- Task: Write integration tests to verify API endpoints (e.g., POST /books creates a book) using Spring Boot Test and Rest Assured.
- Quiz: Questions on integration testing (e.g., “What does Spring Boot Test provide for integration testing?”).
Chapter 5: JavaScript Testing
- Lecture:
- Introduction to Jest for testing JavaScript code.
- Writing tests for functions, modules, and (optionally) React components.
- Techniques: mocking external dependencies, assertions, and test setup.
- Lab:
- Provided: A sample JavaScript function (e.g., a calculator) or a simple React component (e.g., a button counter).
- Task: Write tests using Jest (e.g., test that adding 2 + 3 returns 5, or that clicking a button increments a counter).
- Quiz: Questions on JavaScript testing (e.g., “What is the role of expect() in Jest?”).
Chapter 6: End-to-End Testing
- Lecture:
- Introduction to Selenium (Java-based) or Cypress (JavaScript-based) for browser automation.
- Writing end-to-end tests to simulate user interactions (e.g., filling forms, clicking buttons).
- Handling asynchronous behavior and verifying UI states.
- Lab:
- Provided: A sample web application (e.g., a login page with a dashboard).
- Task: Write an end-to-end test to automate a user journey (e.g., log in and navigate to the dashboard) using Selenium or Cypress.
- Quiz: Questions on end-to-end testing (e.g., “What is the difference between Selenium and Cypress?”).
Chapter 7: Reporting and Metrics
- Lecture:
- Generating test execution reports using X-Ray and Zephyr in Jira.
- Analyzing metrics: test coverage, pass/fail rates, defect trends.
- Using reports to identify quality gaps and improve testing efforts.
- Lab:
- Provided: The test plan from Chapter 2 with executed tests.
- Task: Execute the test plan in Jira and generate a report showing test results (e.g., 80% pass rate).
- Quiz: Questions on reporting (e.g., “What metrics can you derive from a Zephyr test report?”).
Chapter 8: Best Practices and Integration
- Lecture:
- Integrating testing into the SDLC: planning, development, and deployment phases.
- Continuous testing in CI/CD pipelines (e.g., running tests in Jenkins or GitHub Actions).
- Best practices: writing testable code, prioritizing critical tests, and maintaining test suites.
- Discussion:
- Open forum for students to share experiences and discuss challenges (e.g., “How do you handle flaky tests?”).
Chapter 9: Using AI and AI Tools in Software Testing
- Lecture:
- Understanding the role AI in Software Testing.
- Using AI to Generate Test Plans.
- Using AI to Generate Test Cases.
- Lab:
- Provided: The Spring Boot BookController (Chapter 4) and JavaScript calculator.js (Chapter 5).
- Task: Use an AI tool (e.g., Grok) to create a test plan and test cases for a provided application, then integrate them into Jira with X-Ray or Zephyr.
- Quiz: Questions on AI Tools in Software Testing (e.g., “What is a key benefit of using AI in software testing?”).
By Wahid Hamdi