我正在SoapUI中进行API自动化。我有测试服,运行并提供通过和失败测试用例的报告。
我想将这个结果添加到slack帖子中。当我的测试服将被完全执行时,应该在测试用例结果中添加一个松弛的柱子。它是通过还是失败?
为了松弛集成,我需要在Groovy脚本中导入哪个库?
谢谢!
发布于 2017-11-01 11:04:23
我是用URL类做的
def post = new URL('url')
String body="token=yourtoken&channel=yourchannel&text=yourtext";
def connection = post.openConnection()
connection.with
{
doOutput = true
requestMethod = 'POST'
outputStream.withWriter { writer ->
writer << body
}
log.info content.text
}https://stackoverflow.com/questions/47034705
复制相似问题