Eclipse - Testng引用不存在的项目XXX,启动配置 [英] Eclipse -- Testng references non-existing project XXX, launch configuration

查看:144
本文介绍了Eclipse - Testng引用不存在的项目XXX,启动配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当试图运行测试作为TestNG套件时,我会收到一个非常隐秘的错误信息,表示TestNG无法启动,因为它引用了一个不存在的项目。我认为我的项目确实存在,我在包资源管理器中看到它!

解决方案

原来你只需要确保您的项目是Java项目,而不是一个简单的项目。 检查导航器是否显示与该文件夹相关联的一点蓝色J。如果没有,那么你创建了一个简单的项目。



您创建的项目不是Java项目。



Eclipse将.java文件自动构建到包含在Java项目中的所有.java文件
的.class文件。



创建一个Java项目
文件>新建>项目> Java项目
给项目一个名称点击完成



发现这个答案隐藏在这个来源。在eclipse中,您应该使用Navigator而不是Package explorer,因为浏览器正在浏览实际的文件系统,其中package explorer只加载某些东西。在未来,希望人们能够更轻松地找到解决方案。


When trying to run a test as a TestNG suite, I would get a very cryptic error message saying that TestNG can't launch because it references a non-existant project. I think my project does exist, I see it in the package explorer!

解决方案

It turns out you just have to make sure your project is a Java Project, and not a Simple project. Check that the navigator shows a little blue 'J' associated with the folder. If not, then you have created a Simple project.

"It would appear that the project you created is not Java project.

Eclipse auto-builds the .java file to .class files for all .java files contained in a Java project.

To create a Java project File>New>Project>Java Project Give the project a name. Click Finish"

Found this answer hidden deep in this source.

In eclipse you should be using Navigator and not Package explorer, as navigator is browsing the actual filesystem, where package explorer is loading certain things only. In the future hopefully people can find the solution more easily.

这篇关于Eclipse - Testng引用不存在的项目XXX,启动配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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