Java - Test - TestNG: Idea introduction of automatic generation of plug-in testng.xml

1 Overview

  1. Idea generated automatically introduced testng.xml widget
  2. Automatic generation testng.xml

2. Background

  1. testng debugging
    1. Debugging testng, mainly two methods
      1. Direct test is performed under the ide
        1. method
        2. class
      2. ide under execution testng.xml
  2. testng.xml
    1. Outline
      1. Test suite configuration file
  3. problem
    1. Every time handwriting, would be more trouble
      1. solution
        1. A backup, according to each format change
        2. Use plug-ins to automatically create
        3. Write a program to automatically generate xml
      2. feel
        1. Option 2 is the most convenient

3. Environment

  1. here
    1. idea
      1. 2018.2

Step 4

  1. Plug: Create TestNG XML
    1. Into the plug-in management
      1. path

        file > settings > plugins
    2. Search plugin
      1. Enter a search
        1. testng

      2. Seek
        1. Click Browse repositories...
      3. Find the plug-in Create TestNG XML

    3. Install plug
      1. Right-click on
        1. install
      2. After a successful installation reboot idea

5. Use

  1. Create a file testng.xml
    1. Right Project
    2. select Create TestNG XML
  2. result
    1. File successfully generated testng.xml
  3. other
    1. prompt
      1. After confirming the operation, there will be a prompt
        1. Tips content
          1. file name
          2. file path
    2. Refresh
      1. Be sure to refresh the project window

        # 焦点在 project 上
        ctrl + alt + y
    3. format
      1. The default format looks a bit messy
        1. Adjustment

          # 打开testng.xml
          # 焦点在 代码窗口
          ctrl + alt + l
    4. content
      1. This would not guarantee the
        1. But certainly usable

ps

  1. ref
    1. java idea of ​​integration testng, Maven
  2. Follow-up
    1. Some brief case of testng

Guess you like

Origin www.cnblogs.com/xy14/p/11832443.html