【问题标题】:Unable to install TestNG plugin in latest Eclipse IDE无法在最新的 Eclipse IDE 中安装 TestNG 插件
【发布时间】:2020-08-24 15:09:08
【问题描述】:

尝试在最新的 Eclipse 中安装 TestNG 时出现以下错误:

由于我的项目在测试框架中使用 TestNG,任何人都可以帮助解决这个问题

【问题讨论】:

    标签: eclipse selenium testing selenium-webdriver testng-eclipse


    【解决方案1】:

    请按照以下步骤操作,任何人都可以让 testNG 在任何版本的 Eclipse 中运行:

    1. 从 github 下载源代码:testNG Source in Git 并获取适合您需要的任何版本

    1. 下载后解压文件夹到eclipse目录:假设你把它保存在C:驱动器中,那么你要解压的路径是:C:\eclipse\dropins : 最好使用 7zip 解压器解压到目录

    2. 将文件夹解压到eclipse的dropins文件夹

    3. 解压后,您需要在文件夹中添加一个文件:site.xml。创建一个 site.xml 文件并添加以下详细信息:凡是引用 ,请不要忘记添加下载的 testNG 版本

       <?xml version="1.0" encoding="UTF-8"?>
       <site>
      <feature url="features/org.testng.eclipse_<TestNG_Version_downloaded>.jar" id="org.testng.eclipse" version="<TestNG_Version_downloaded>">
         <category name="org.testng.eclipse"/>
      </feature>
      <feature url="features/org.testng.eclipse.maven.feature_7.0.0.201908240652.jar" id="org.testng.eclipse.maven.feature" version="<TestNG_Version>">
         <category name="org.testng.eclipse"/>
      </feature>
      <category-def name="org.testng.eclipse" label="TestNG"/>
      

    以及xml文件内容仅供参考:

    1. 一切都完成后:转到 Eclipse,然后执行 ctrl+N,您会看到 testNG 出现在菜单中,就是这样,您可以使用 TestNG。快乐编码!!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-08-10
      • 1970-01-01
      • 1970-01-01
      • 2010-10-18
      • 2012-04-03
      • 2011-10-11
      • 1970-01-01
      相关资源
      最近更新 更多