如何使用 Petrel 演示项目运行 Ocean 测试

发布于 2025-01-05 16:31:07 字数 694 浏览 0 评论 0原文

我正在尝试运行 Ocean 测试框架测试,在其中打开 Petrel 2011 演示项目。但是,当我使用 PetrelSystem.ProjectService.OpenPrimaryProject() 打开项目时,我收到以下错误消息,并且测试被中止:

Error: File EclipseNamesToPropertyTypeCatalog.xml not found in the installation
File EclipseNamesToPropertyTypeCatalog.xml not found in the installation
Slb.Ocean.Petrel.ProjectOpenException : Could not open the project.
----> Petrel_Framework_NS.TestAssertionException : File EclipseNamesToPropertyTypeCatalog.xml not found in the installation
at Slb.Ocean.Petrel.Core.Impl.Core.ProjectService.OpenPrimaryProject(String projectPath)
at Slb.Ocean.Petrel.ProjectService.OpenPrimaryProject(String path)

此问题有解决方法吗?

I am trying run a Ocean test framework test where I open the Petrel 2011 demo project. However, when I open the project with PetrelSystem.ProjectService.OpenPrimaryProject() I get the following error message and the test is aborted:

Error: File EclipseNamesToPropertyTypeCatalog.xml not found in the installation
File EclipseNamesToPropertyTypeCatalog.xml not found in the installation
Slb.Ocean.Petrel.ProjectOpenException : Could not open the project.
----> Petrel_Framework_NS.TestAssertionException : File EclipseNamesToPropertyTypeCatalog.xml not found in the installation
at Slb.Ocean.Petrel.Core.Impl.Core.ProjectService.OpenPrimaryProject(String projectPath)
at Slb.Ocean.Petrel.ProjectService.OpenPrimaryProject(String path)

Is there a workaround for this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

隐诗 2025-01-12 16:31:07

这只是一条评论,但我首先需要 50 次代表。

直接使用 nunit.exe(来自 Petrel 安装文件夹)运行测试是否有效?

您的测试或项目是否涉及 Eclipse?如果没有,您可以从 petrel.exe.config 注释掉 Eclipse 相关模块。不是解决方案,而是建议的解决方法。

This is just a comment, but I need 50 rep first.

Does it work when running the test directly with nunit.exe (from the Petrel installation folder)?

Does your test or project involve Eclipse at all? If not, you may be able to comment out Eclipse related modules from petrel.exe.config. Not a solution, but a suggested workaround.

沐歌 2025-01-12 16:31:07

EclipseNamesToPropertyTypeCatalog.xml 与 Petrel 一起部署在 xml 文件夹下。显然工作目录不同,因此找不到该文件。

EclipseNamesToPropertyTypeCatalog.xml is deployed with Petrel under the xml folder. Apparently the working directory is different so that the file is not found.

绝情姑娘 2025-01-12 16:31:07

你不需要解决问题。为了运行演示项目,您需要正确配置 petrel 环境变量,以便它们打开预先配置的演示项目。

这可以通过将 PetrelTestProjectRoot 和 PetrelTestProject 环境变量设置为适当的路径来完成

You dont need a work around. In order to run the demo project you need to configure the petrel environment variables correctly so they open the pre-configured demo project.

This can be done by setting the the PetrelTestProjectRoot and PetrelTestProject environment variables to the appropriate paths

安稳善良 2025-01-12 16:31:07

这个答案是关于Visual Studio测试人员的(未在Resharper测试人员上验证,但本质应该相似)。

看起来 Petrel 根据调用程序集路径加载这些 .xml 文件,例如,如果测试人员正在加载 Petrel,这些文件需要与测试人员位于同一路径中。

解决方法之一是将文件复制(或创建符号链接)到测试程序 exe 的文件夹中。例如在 VS2012 中:

image: Files Copyed to the tester exe path

这适用于其他版本的 Visual工作室也是。

This answers is about Visual Studio testers (not verified on Resharper tester but the essence should be similar).

Looks like Petrel loads these .xml files based on the calling assembly path, e.g if a tester is loading Petrel, these files need to be in the same path as the tester.

One of the workaround is to copy (or making a Symbolic link to) the files to the folder of the tester exe. E.g. in VS2012:

image: Files copied to the tester exe path

This applies to other versions of Visual Studio too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文