-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocumentation.txt
100 lines (73 loc) · 5.55 KB
/
Documentation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
DEVxHUB 2023 Automation Testing Documentation
This documentation provides a comprehensive guide for the𝗦𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗔𝘂𝘁𝗼𝗺𝗮𝘁𝗶𝗼𝗻 𝗧𝗲𝘀𝘁𝗶𝗻𝗴 𝗖𝗼𝗻𝘁𝗿𝗶𝗯𝘂𝘁𝗼𝗿 𝗣𝗿𝗼𝗴𝗿𝗮𝗺 𝗯𝘆 𝗗𝗘𝗩𝘅𝗛𝗨𝗕 𝗶𝗻 𝟮𝟬𝟮𝟯. It explains the structure and usage of an automation testing script. The script is designed to automate testing tasks for the 𝗗𝗘𝗩𝘅𝗛𝗨𝗕 application, and it uses 𝗣𝘆𝘁𝗵𝗼𝗻, 𝗦𝗲𝗹𝗲𝗻𝗶𝘂𝗺, 𝗮𝗻𝗱 𝘁𝗵𝗲 𝗛𝘁𝗺𝗹𝗧𝗲𝘀𝘁𝗥𝘂𝗻𝗻𝗲𝗿 𝗹𝗶𝗯𝗿𝗮𝗿𝘆. We will cover the following sections:
1. 𝗜𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻:
- Purpose of Automation Testing
- Technologies Used
- Test Scenarios
2. 𝗦𝗲𝘁𝘁𝗶𝗻𝗴 𝘂𝗽 𝘁𝗵𝗲 𝗧𝗲𝘀𝘁 𝗘𝗻𝘃𝗶𝗿𝗼𝗻𝗺𝗲𝗻𝘁:
- Prerequisites
- Installation
- Configuration
3. 𝗦𝗰𝗿𝗶𝗽𝘁 𝗢𝘃𝗲𝗿𝘃𝗶𝗲𝘄:
- Test Structure
- Logging
- Browser Setup
- Test Cases
4. 𝗥𝘂𝗻𝗻𝗶𝗻𝗴 𝘁𝗵𝗲 𝗧𝗲𝘀𝘁𝘀:
- Test Execution
- Test Reports
𝟭. 𝗜𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻
𝗣𝘂𝗿𝗽𝗼𝘀𝗲 𝗼𝗳 𝗔𝘂𝘁𝗼𝗺𝗮𝘁𝗶𝗼𝗻 𝗧𝗲𝘀𝘁𝗶𝗻𝗴
Automation testing is a critical component of the 𝗗𝗘𝗩𝘅𝗛𝗨𝗕 software development lifecycle. It helps ensure the quality, functionality, and performance of the application by automating repetitive test cases and scenarios.
𝗧𝗲𝗰𝗵𝗻𝗼𝗹𝗼𝗴𝗶𝗲𝘀 𝗨𝘀𝗲𝗱
The automation testing script leverages the following technologies:
- Python
- Selenium
- HTMLTestRunner
𝗧𝗲𝘀𝘁 𝗦𝗰𝗲𝗻𝗮𝗿𝗶𝗼𝘀
The script covers the following test scenarios:
- Boundary value testing
- Negative test cases
- Performance testing (placeholder)
- Security testing (placeholder)
𝟮. 𝗦𝗲𝘁𝘁𝗶𝗻𝗴 𝘂𝗽 𝘁𝗵𝗲 𝗧𝗲𝘀𝘁 𝗘𝗻𝘃𝗶𝗿𝗼𝗻𝗺𝗲𝗻𝘁
𝗣𝗿𝗲𝗿𝗲𝗾𝘂𝗶𝘀𝗶𝘁𝗲𝘀
Before running the script, make sure you have the following prerequisites installed:
- Python
- Selenium WebDriver (Chrome or Firefox)
- HtmlTestRunner library
𝗜𝗻𝘀𝘁𝗮𝗹𝗹𝗮𝘁𝗶𝗼𝗻
To install the required Python libraries, use the following commands:
𝐩𝐢𝐩 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐬𝐞𝐥𝐞𝐧𝐢𝐮𝐦
𝐩𝐢𝐩 𝐢𝐧𝐬𝐭𝐚𝐥𝐥 𝐡𝐭𝐦𝐥-𝐭𝐞𝐬𝐭𝐑𝐮𝐧𝐧𝐞𝐫
𝗖𝗼𝗻𝗳𝗶𝗴𝘂𝗿𝗮𝘁𝗶𝗼𝗻
The test script uses a configuration file `𝗰𝗼𝗻𝗳𝗶𝗴.𝗷𝘀𝗼𝗻` to store the base URL and browser choice. Make sure to configure this file properly.
𝟯. 𝗦𝗰𝗿𝗶𝗽𝘁 𝗢𝘃𝗲𝗿𝘃𝗶𝗲𝘄
𝗧𝗲𝘀𝘁 𝗦𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲
The script is organized as a Python unittest test case, and it consists of the following key components:
- Import statements for necessary libraries and modules
- 𝘀𝗲𝘁𝗨𝗽𝗖𝗹𝗮𝘀𝘀: Setting up the test environment
- 𝗧𝗲𝘀𝘁 𝗺𝗲𝘁𝗵𝗼𝗱𝘀: Containing the actual test scenarios
- 𝘁𝗲𝗮𝗿𝗗𝗼𝘄𝗻𝗖𝗹𝗮𝘀𝘀: Cleaning up resources after all tests have run
𝗟𝗼𝗴𝗴𝗶𝗻𝗴
The script uses logging to record test execution information. Logs are stored in a file named `test.log`.
𝗕𝗿𝗼𝘄𝘀𝗲𝗿 𝗦𝗲𝘁𝘂𝗽
The script supports both Chrome and Firefox browsers for testing. The `setup_driver` method is responsible for initializing the selected browser.
𝗧𝗲𝘀𝘁 𝗖𝗮𝘀𝗲𝘀
1. `test_boundary_value`: Tests boundary value conditions.
2. `test_negative_case`: Tests negative scenarios.
3. `test_performance`: A placeholder for performance testing.
4. `test_security`: A placeholder for security testing.
5. `test_open_website_and_scenario1`: Opens the DEVxHUB website and performs scenario 1.
6. `test_scroll_to_footer_and_scenario2`: Scrolls to the website's footer and performs scenario 2.
7. `test_click_company_dropdown_and_scenario3`: Clicks on the Company Dropdown Button and performs scenario 3.
8. `test_click_career_button_and_scenario4`: Navigates directly to the Career Page URL and performs scenario 4.
𝟰. 𝗥𝘂𝗻𝗻𝗶𝗻𝗴 𝘁𝗵𝗲 𝗧𝗲𝘀𝘁𝘀
𝗧𝗲𝘀𝘁 𝗘𝘅𝗲𝗰𝘂𝘁𝗶𝗼𝗻
To execute the tests, use the following command:
𝗽𝘆𝘁𝗵𝗼𝗻 <𝘀𝗰𝗿𝗶𝗽𝘁_𝗻𝗮𝗺𝗲.𝗽𝘆>
𝗧𝗲𝘀𝘁 𝗥𝗲𝗽𝗼𝗿𝘁𝘀
Test results are saved in an HTML report with a timestamp. You can find the reports in the "test-reports" directory. The report title is "DEVxHUB Automation Testing Report".
After running the tests, check the reports to see the detailed results. If all tests pass successfully, you will see the message "All tests passed successfully." If there are failures, review the report for details on which tests failed.
---
This documentation should help you understand and utilize the automation testing script effectively for the DEVxHUB 2023 Software Automation Testing Contributor Program. If you encounter any issues or need further assistance, please don't hesitate to reach out to the 𝗗𝗘𝗩𝘅𝗛𝗨𝗕 𝘁𝗲𝘀𝘁𝗶𝗻𝗴 𝘁𝗲𝗮𝗺. Good luck with your testing contributions!