将OAuth2支持添加到自动框架

发布于 2025-02-07 04:55:32 字数 244 浏览 1 评论 0原文

因此,我们目前有一个框架BDD,并放心。一直以来,它都是用伪造设置的,只是为了确保在拥有实际数据时准备就绪框架。目前,我已经有了已运行的功能夫妇。我们最近添加了OAuth2支持。

现在,我自动化了该过程以获取承载令牌,但对我应该如何使用它感到困惑。我应该将携带者令牌保存为变量,然后在请求中通过它吗?

我如何做到这一点,以便框架生成承载令牌,然后使用该令牌运行测试(CRUD操作)。我是否必须制作另一个功能,并首先从Cukes Runner跑步?

So we currently have a framework bdd with rest assured . All this time it was set up with service fake just to make sure the framework is ready for when we have actual data . Currently I already have couples of features running already. We recently added Oauth2 support .

Now I automated the process to get the bearer token but confused on how I should go about using it. Should i save the bearer token as a variable and just pass it in the requests ?

How do I make it so the framework generates bearer token then uses that token to run the tests (crud operation). Do I have to make another feature and have that running first from cukes runner?

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

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

发布评论

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