简体   繁体   English

如何使用 Sikuli4Net 或 SikuliSharp 与 Visual Studio for Mac 在 MacOS 上测试 .NET Core 跨平台应用程序?

[英]How can I use Sikuli4Net or SikuliSharp with Visual Studio for Mac to test .NET Core cross platform applications on MacOS?

I have a cross-platform desktop application written in Xamarin.Forms that runs both in Windows and MacOS.我有一个用 Xamarin.Forms 编写的跨平台桌面应用程序,它可以在 Windows 和 MacOS 中运行。 I want to do some UI automation on top of that application.我想在该应用程序之上进行一些 UI 自动化。

After some research it seems like the most cross-platform friendly option is to use Something like Sikuli.经过一些研究,似乎最跨平台友好的选择是使用像 Sikuli 这样的东西。 As the default stack on our team is centered on the .NET stack we want to use SikuliSharp or Sikuli4Net to perform the automated UI tests.由于我们团队的默认堆栈以 .NET 堆栈为中心,我们希望使用 SikuliSharp 或 Sikuli4Net 来执行自动化 UI 测试。

However, despite of the fact that we've been able to run Sikuli4Net successfully on Windows, automating several flows so far.然而,尽管我们已经能够在 Windows 上成功运行 Sikuli4Net,但到目前为止已经自动化了几个流程。 We have a dire situation on MacOS.我们在 MacOS 上遇到了可怕的情况。 Our team (myself included) doesn't have a lot (or maybe any) knowledge of Java applications.我们的团队(包括我自己)对 Java 应用程序了解不多(或者可能没有)。

I've installed the JDK 8, but was unable to run the tests in the same way we did on Windows.我已经安装了 JDK 8,但无法像在 Windows 上那样运行测试。 The code builds, but it seems like something in the environment is lacking.代码构建,但似乎环境中缺少某些东西。

With Sikuli4Sharp when starting the APILauncher like this:像这样启动 APILauncher 时使用 Sikuli4Sharp:

launch = new APILauncher(true);
launch.Start();

I get the following error:我收到以下错误:

在此处输入图像描述

With SikuliSharp when trying to run a simple demo application on our software I have this error:使用 SikuliSharp 在我们的软件上尝试运行简单的演示应用程序时出现此错误:

在此处输入图像描述

I have tried to set up the SIKULI_HOME environment variable using this answer as a reference, but still the same problem (and I did restart the console and IDE, even my machine).我尝试使用此答案作为参考来设置 SIKULI_HOME 环境变量,但仍然是同样的问题(我确实重新启动了控制台和 IDE,甚至我的机器)。

When I run echo $SIKULI_HOME on the terminal I do get the directory that cointains the.jar files:当我在终端上运行echo $SIKULI_HOME时,我确实得到了包含 .jar 文件的目录:

在此处输入图像描述

So I'm kind of lost about were to go from here.所以我有点迷失从这里到 go 。 These problems made me unsure about being possible to run Sikuli4Net or SikuliSharp on MacOS environments.这些问题让我不确定能否在 MacOS 环境中运行 Sikuli4Net 或 SikuliSharp。 Is this the case?是这样吗? If not, what am I doing wrong?如果没有,我做错了什么?

as mentioned in the error message: sikuli-script.jar is missing.如错误消息中所述:缺少 sikuli-script.jar。

You have to check on what version of Sikuli/SikuliX your SikuliSharp or Sikuli4Net are depending on.您必须检查您的 SikuliSharp 或 Sikuli4Net 所依赖的 Sikuli/SikuliX 版本。

In doubt you have to dive into the sources of those Net packages.毫无疑问,您必须深入研究这些 Net 软件包的来源。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .NET6 与 Visual Studio for Mac M1 不兼容,我可以为 xamarin 使用什么? - .NET6 not compatible with Visual Studio for Mac M1, what can I use for xamarin? 适用于Mac的Visual Studio的Dot NET Core托管环境 - Dot NET Core Hosting Environment for Visual Studio for Mac 项目不是在活动配置Visual Studio MacOS .net Core中构建的 - Project not build in active configuration Visual Studio MacOS .net Core .NET 核心 3 API,在 Mac 上使用 Visual Studio Code 开发:如何在 IIS 上部署和配置? - .NET core 3 API, develop on Mac with Visual Studio Code: how deploy and configure on IIS? Visual Studio For Mac .net Core 2.0 Ajax将模型传递给控制器 - Visual Studio For Mac .net Core 2.0 Ajax passing model to controller Visual Studio for Mac控制台应用程序.net Core 2命令行参数 - Visual Studio for Mac Console Application .net Core 2 command line arguments Visual Studio Preview for Mac 2017 .NET Core构建错误 - Visual Studio Preview for Mac 2017 .NET Core build error 在.NET Core 2,Mac OS,使用MySQL的Visual Studio for Mac上:ArgumentOutOfRangeException:长度不能小于零 - On .NET Core 2, Mac OS, Visual Studio for Mac using MySQL: ArgumentOutOfRangeException: Length cannot be less than zero Visual Studio 在 Visual Studio For Mac 2022 上未使用正确的 .NET SDK - Visual Studio Not Using Correct .NET SDK on Visual Studio For Mac 2022 我可以使用构建服务器通过 Visual Studio 为 Windows 和 Xamarin 开发 MacOS 桌面应用程序吗? - Can I develop MacOS desktop applications via Visual Studio for Windows and Xamarin using a build server in the same way I would for a iOS app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM