|
143 | 143 | {CODE_DIFF} |
144 | 144 |
|
145 | 145 | """ |
146 | | -# TODO: Rephrase prompt to make it more clear and accurate. |
| 146 | + |
147 | 147 | UI_MODULES_PROMPT = """ |
148 | | -Assign yourself as a quality assurance engineer. Read this code and design comprehensive tests to test the UI |
149 | | -of this html. Break it down into 5-10 separate modules and return the output as JSON with the following keys: |
150 | | -id - serial number to identify |
| 148 | +Assign yourself as a quality assurance engineer. |
| 149 | +Read this code and design comprehensive tests to test the UI of this HTML. |
| 150 | +Break it down into 5-10 separate modules and identify the possible things to test for each module. |
| 151 | +For each module, also identify which tests should be checked repeatedly (e.g., after every code change, every build, etc.). |
| 152 | +
|
| 153 | +Return the output as JSON with the following keys: |
| 154 | +id - serial number to identify module |
151 | 155 | module_title - title of the identified module |
152 | | -tests - JSON containing list of tests steps to carry out for that module with keys - id, test_description, test_name. |
| 156 | +tests - JSON containing list of tests steps to carry out for that module with keys: |
| 157 | + id - serial number for the test case |
| 158 | + test_description - description of the test case |
| 159 | + test_name - name of the test case |
| 160 | + repeat - boolean indicating if this test should be checked repeatedly or not |
153 | 161 | folder_name - relevant name for the module |
154 | 162 | importance - level of importance of this test out of ['critical', 'good_to_have', 'non_essential'] |
155 | | -Share the JSON output ONLY. No other text. |
156 | 163 |
|
157 | | -CONTENT: |
158 | | -```{WEB_CONTENT}``` |
| 164 | +Share the JSON output ONLY. No other text. |
| 165 | +CONTENT: ```{WEB_CONTENT}``` |
159 | 166 | """ |
160 | 167 |
|
161 | | -# TODO: Rephrase prompt to make it more clear and accurate. |
162 | 168 | UI_TESTS_SYSTEM_PROMPT = """ |
163 | | -As a test case engineer, your task is to write comprehensive test cases for a given user interface. |
164 | | -You should review the user interface and identify all possible use cases and edge cases that need to be tested. |
165 | | -Your test cases should cover all aspects of the user interface, including functionality, usability, and accessibility. |
| 169 | +Here's a shortened version of the system prompt: |
| 170 | +
|
| 171 | +You are a Quality Assurance AI assistant specializing in writing Playwright test scripts for web applications. Your goal is to create robust and maintainable test scripts that can be integrated into a CI/CD pipeline. |
| 172 | +
|
| 173 | +When given requirements or specifications, you should: |
| 174 | +
|
| 175 | +1. Analyze the requirements and design a comprehensive test plan. |
| 176 | +2. Write Playwright test scripts in Python 3.9 following best practices. |
| 177 | +3. Implement techniques like Page Object Model for reusability. |
| 178 | +4. Utilize Playwright's features for interacting with web elements and capturing screenshots/videos. |
| 179 | +5. Incorporate data-driven testing and parallelization strategies. |
| 180 | +6. Ensure compatibility with the CI/CD pipeline and provide clear documentation. |
| 181 | +7. Continuously maintain and improve the test scripts as the application evolves. |
| 182 | +
|
| 183 | +Prioritize code quality, maintainability, and adherence to best practices in test automation. Collaborate with developers and stakeholders for seamless integration into the software development lifecycle. |
| 184 | +
|
| 185 | +Remember, you cannot open URLs or links directly. Ask the human to provide relevant text or image content if needed. |
166 | 186 | """ |
167 | 187 |
|
168 | | -# TODO: Rephrase prompt to make it more clear and accurate. |
169 | 188 | PLAYWRIGHT_CODE_PROMPT = """ |
170 | | -Assign yourself as a quality assurance engineer. Read this code and write playwright code for test - |
171 | | -{TEST_DESCRIPTION}. Return ONLY the playwright code based on python and strictly no other text. |
| 189 | +Read this code and write Playwright code in Python for the following test - {TEST_DESCRIPTION}. |
| 190 | +Return ONLY the Playwright code in Python and strictly no other text. |
172 | 191 |
|
173 | 192 | URL: {URL} |
| 193 | +Content: |
174 | 194 | ```{WEB_CONTENT}``` |
175 | 195 | """ |
176 | 196 |
|
|
0 commit comments