# 软件测试 **Repository Path**: haobotan/software-testing ## Basic Information - **Project Name**: 软件测试 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-11 - **Last Updated**: 2026-05-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: Java, Testing ## README # Software Testing Practice Project This is a Java software testing learning project containing a variety of testing scenarios and practice modules, ranging from basic to advanced levels. ## Project Structure ``` software-testing/ ├── test_01/ # Basic Testing Exercises │ ├── 01_one/ # Maximum Value Algorithm Test │ ├── 02_one/ # Maximum Value Algorithm Test (Alternative Implementation) │ └── 03_one/ # Temperature Converter Test ├── test_02/ # Advanced Testing Exercises │ ├── 01_tow/ # Calculator Test │ ├── 02_tow/ # Library Management System Test (Mock Testing) │ └── 03_tow/ # Shopping Cart Test └── test_03/ # Advanced Testing Exercises ├── 01_three/ # Environment Simulation Test ├── 02_three/ # Servlet Simulation Test └── 04_three/ # Spring Boot QR Code Application Test ``` ## Module Descriptions ### test_01 - Basic Testing - **01_one / 02_one**: Maximum Value Algorithm Implementation and Testing - `Largest.java`: Implements an algorithm to find the maximum value in an array - Includes multiple test scenarios: simple arrays, ordered arrays, duplicate elements, negative numbers, empty arrays - **03_one**: Temperature Converter - `IThermometer`: Temperature interface - `ThermometerImpl`: Implements Celsius-to-Fahrenheit and Fahrenheit-to-Celsius conversion - Tests temperature conversion and display functionality ### test_02 - Advanced Testing - **01_tow**: Calculator - `Calculator`: Implements basic arithmetic operations such as addition, subtraction, multiplication, division, square, and square root - Includes unit tests for fundamental arithmetic operations - **02_tow**: Library Management System - `Book`: Book entity class - `BookManager`: Library management interface - `BookService`: Book service (borrow/return functionality) - Uses mock objects for testing - **03_tow**: Shopping Cart - `Product`: Product entity - `ShoppingCart`: Shopping cart functionality (add/remove products) - Tests CRUD operations on the shopping cart ### test_03 - Advanced Testing - **01_three**: Environment Simulation Test - `Envirorunental`: Environment interface - `MockSystemEnvirorunent`: Simulates system environment - Demonstrates how to use mock objects for environment-dependent testing - **02_three**: Servlet Testing - `MockHttpServletRequest`: Simulates HTTP requests - `MockHttpServletResponse`: Simulates HTTP responses - `TemperatureServlet`: Temperature service servlet - Demonstrates web-layer testing techniques - **04_three**: Spring Boot QR Code Application - QR code generation/decoding service built with Spring Boot + LiteFlow - Includes multiple components: Base64-to-image conversion, stream decoding, URL download, QR code generation, upload to COS, etc. - Integrated with Tencent Cloud COS object storage ## Technology Stack - **Java** - **Maven** - **JUnit 4/5** - **Spring Boot** - **Log4j2** ## Quick Start ### Prerequisites - JDK 8 or higher - Maven 3.x ### Build the Project ```bash # Build the entire project mvn clean install # Build a specific module cd test_01/01_one mvn clean test ``` ### Run Tests ```bash # Run all tests mvn test # Run tests for a specific module cd test_01/01_one mvn test ``` ## Testing Overview This project covers a variety of testing techniques and scenarios: | Test Type | Modules | |----------|---------| | Unit Testing | test_01, test_02 | | Mock Testing | test_02/02_tow, test_03/01_three | | Web Layer Testing | test_03/02_three | | Integration Testing | test_03/04_three | ## License This project is intended solely for learning and educational purposes.