情况是这样的:我有一个django后端来运行测试,创建XML文件,并将它们发送到django前端,django前端可以对它们执行任何操作(实际上生成HTML文件)
[后端]->;XML->[前端]->;HTML格式
我的问题是:在XML文件中,我有指向文档的外部链接,文档由我的前端托管,其URL只有后者知道
如何配置“.robot”文件以创建在处理XML文件期间由rebot更改的元素,以及需要为rebot提供哪些参数
编辑: 如评论中所问,下面是一个例子:
我的robot文件实际上包含如下测试:
Test_1
[Documentation]Doc: [${PathToRefDoc}#test_1 | test_1_doc]
<:Do Things:>
${PathToRefDoc}值在生成XML文件的过程中被替换,它给出如下内容:
<test id="1" name="Test_1"
<doc>Doc: [<:ref doc URL:>#test_1 | test_1_doc]</doc>
<:Infos on things done:>
</test>
我想要不带<;的XML文件:参考文档URL:>;值已经被设置,因为它的值在创建文件的过程中是未知的,但是作为“宏”应该在reboot处理XML文件的过程中给出
我终于在robotframework存储库的API文档中找到了一个解决方案:
Robotframework ouput documentation
我需要创建一个继承SuiteVisitor类的类,下面是代码
在调用rebot框架的代码中,我必须添加'prerebotmodifier'参数:
相关问题 更多 >
编程相关推荐