English 中文(简体)
通过 testng.xml 创建测试NG 套件, 在 Eclipse 运行( 窗口)
原标题:Creating a TestNG suite via testng.xml to run in Eclipse (Windows)

我对自动化还有些新奇,我并不正式知道任何编程语言,但能够通过研究和决心完成。 结果,我的术语很差,所以如果我没有说清楚,请原谅我:D:

我成功地在java中写下了几十个 测试脚本, 但这种.xml 格式是新的领域, 我找不到像我这样的新人 任何像样的文件。

以下是我的问题:

目前我正在通过Eclipse部署我的(RC)测试NG测试课程。 我理解我必须写我自己的自定义测试. xml 文件才能部署套房。 也就是说, 我被这个文件的上下文混淆了。 这似乎相当直截了当, 但我似乎无法让它执行我在这里投放的任何课程 。

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="Suite" verbose="1" >
  <test name="NameofMyTest" >
      <classes>
       <class name="O13TestNG" />
       <class name="U13PITestNg2" />
  </classes>
  </test>
</suite>

我打电话到的这些班级是不同的。 但是, 这些班级在通过 testNG 套房运行时, 是否必须使用相同的包件 。 在作为 JUM 套房运行时, 我只需输入套房类中的班级, 并在 Ecplipse 中作为 JUIT 测试运行, 但似乎TON 提供的所有花哨报告都与 JUI 并不相同 。 还是这样呢? 如果是, 我如何找到它?

最佳回答

您也许应该与类一起指定软件包名称。 例如 :

<class name="com.company.project.YourTest" />

至于报告:据知测试NG报告能力优于JUM。测试NG的功能也比较丰富,所以我绝对会坚持。

问题回答

暂无回答




相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签