1 Overview
- maven Idea developed add-dependent testng
2. Background
- Recent review TestNG
- Try to set up environment
- I found a lot of textbooks and online tutorials, all of eclipse
- I use the idea
- This looks like a lot of places did not find, or that speaks unclear
3. Environment
- the
- win
- 10
- win
- here
- idea
- 2018.01
- idea
- maven
- 3.6.0
- spring boot
- 2.2.1 release
4. Prepare
- Spring Boot project
- Outline
- Prepare in advance a Spring Boot project
- Once you've created, you can wait for the idea to build success
- Outline
5. Operation
- To confirm the plug
- Open the idea of plug-in settings
- Mode 1
path
file > settings > plugins
- Mode 2
hot key
ctrl + alt + s
- Mode 1
- Find the plug
Entry
testng
- result
- normal circumstances
- Find a TestNG-J plug
- other
- If not, install
- Installation way I do not write this very good looking
- If not, install
- normal circumstances
- Open the idea of plug-in settings
- The introduction of dependence
- Method 1: Traditional methods - pom add dependencies
- step
- Determine the version
- Confirm description
- Modify pom
- Import dependence
- This will not elaborate on it, we should be able
- Not students, can look for add dependencies maven
- step
- Method 2: When you create a Test class, by the way introduced
- step
- Find a code classes
- Right menu
- goto > test
- After selecting to create a new test class pop-up dialog
- Testing library drop-down menu, the default is JUnit5
- We replaced TestNG
- That does not introduce dependence, so the dialog box will prompt module can not be found
- Click the button next fix
- If not, in fact, this time, has been added dependent on the completion of the
- You do not need to create a test class out
- No problem on the spot Exit
- other
- Question 1: testng version
- problem
- Method 2 does not specify the version of testng
- Version of choice, is the most current release version, does not usually have a big problem
- solve
- Directly
- Need to switch, then only you can go to change to change pom
- problem
- goto
- A jump is relatively easy
- Endpoint
- Code
- Test code
- direction
- Two-way, both sides can jump back and forth
- Endpoint
- Create a test class
- create
- Specify the class name
- Specifies the method name
- Specifies the setup and teardown
- feel
- Convenient for a lot of it
- At least more than their hands to knock a lot of convenience
- After the individual is no longer teach you how to create a test class
- create
- A jump is relatively easy
- Question 1: testng version
- step
- Method 1: Traditional methods - pom add dependencies
ps
- ref
- Follow-up
- Create a test class
- This is not taught
- Use the test class
- This can teach
- The main comment is this will be more
- Configuration test suite / suite
- This will have to pay
- And integrated jenkins
- This can teach
- Create a test class