1 Overview
- Idea generated automatically introduced testng.xml widget
- Automatic generation testng.xml
2. Background
- testng debugging
- Debugging testng, mainly two methods
- Direct test is performed under the ide
- method
- class
- ide under execution testng.xml
- Direct test is performed under the ide
- Debugging testng, mainly two methods
- testng.xml
- Outline
- Test suite configuration file
- Outline
- problem
- Every time handwriting, would be more trouble
- solution
- A backup, according to each format change
- Use plug-ins to automatically create
- Write a program to automatically generate xml
- feel
- Option 2 is the most convenient
- solution
- Every time handwriting, would be more trouble
3. Environment
- here
- idea
- 2018.2
- idea
Step 4
- Plug: Create TestNG XML
- Into the plug-in management
path
file > settings > plugins
- Search plugin
Enter a search
1. testng- Seek
- Click
Browse repositories...
- Click
Find the plug-in
Create TestNG XML
- Install plug
- Right-click on
- install
- After a successful installation reboot idea
- Right-click on
- Into the plug-in management
5. Use
- Create a file testng.xml
- Right Project
- select
Create TestNG XML
- result
- File successfully generated testng.xml
- other
- prompt
- After confirming the operation, there will be a prompt
- Tips content
- file name
- file path
- Tips content
- After confirming the operation, there will be a prompt
- Refresh
Be sure to refresh the project window
# 焦点在 project 上 ctrl + alt + y
- format
- The default format looks a bit messy
Adjustment
# 打开testng.xml # 焦点在 代码窗口 ctrl + alt + l
- The default format looks a bit messy
- content
- This would not guarantee the
- But certainly usable
- This would not guarantee the
- prompt
ps
- ref
- Follow-up
- Some brief case of testng