Eclipse中的TestNG,对未定义变量env.DOMAIN_PATH的引用 [英] TestNG in Eclipse, Reference to undefined variable env.DOMAIN_PATH

查看:134
本文介绍了Eclipse中的TestNG,对未定义变量env.DOMAIN_PATH的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用TestNG在Eclipse中运行单元测试时,我只是遇到一个错误,错误消息是:引用未定义变量env.DOMAIN_PATH

I just got a error when I try to run a unit test in Eclipse with TestNG, the error message is: Reference to undefined variable env.DOMAIN_PATH

但是在Intellj或maven中运行该问题时不存在。

but this problem does not exist when I run it in Intellj or with maven.

有人遇到此问题吗?

我使用Eclipse Mars.2版本(4.5.2),并更新了TestNG插件版本6.9.12.201607091356

I use Eclipse Mars.2 Release (4.5.2), and updated TestNG plugin version 6.9.12.201607091356

谢谢。

推荐答案

当我尝试运行TestNG时,遇到了同样的错误。我在Eclipse中更改了TestNG-> Maven的首选项,以便未选中systemPropertyVariables和environmentVariables,并且能够成功运行测试用例。

When I was trying to run TestNG, I got the same error. I changed the preferences in Eclipse for TestNG -> Maven so that systemPropertyVariables and environmentVariables are unchecked, and I was able to run the test cases successfully.

之前

之后

这篇关于Eclipse中的TestNG,对未定义变量env.DOMAIN_PATH的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆