从 api 获取 String 并将其作为 java 代码运行

发布于 2025-01-17 05:49:18 字数 391 浏览 2 评论 0原文

我从测试工具(在 Jira 中)中抓取了这段代码 为了用自动测试覆盖手动测试 所以我有一些类进行一些测试,使用操作某些操作的方法

,并且我成功地从 zephyr 中抓取测试数据作为方法的字符串 我需要一个 Java 解决方案,如何使这些字符串像 Java 代码一样工作,

这是我从 zephyr api 的 URL 中抓取的字符串: 例如:

"clientUtils().clickOnButton();
browserPageObject().validateBrowserIsOpen();
browserPageObject().closeBrowser();"

这段代码可以单独运行,但我需要推断它作为 Java 运行,

非常感谢谁帮助我以简单且合格的方式解决它

I have this code I'm scraping from testing tool (in Jira)
in order to cover the Manual Test with Automated tests
so I have some class that make some tests uses the methods which operate some actions

and I succeed scrape the test data from zephyr as as string of the methods
I need a solution in Java how to make these string to act like Java code

that's the strings I scraped from the URL of zephyr api:
for example:

"clientUtils().clickOnButton();
browserPageObject().validateBrowserIsOpen();
browserPageObject().closeBrowser();"

this block of code could run as itself but I need to infer it to run as Java

much appreciate who help me solve it with easy and qualified way ????????

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文