自动测试框架 [英] Automated Testing Framework

查看:135
本文介绍了自动测试框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一些我们在工作中的内部Web服务(Java)的自动化测试框架。每个服务都有一组API(3-5),虽然这可能是比较容易实现,问题就来了一些API的不表现为纯粹的功能,例如:像persistX,这可以存储的东西在数据库中,返回柜面失败的异常。
有没有简单的方法来验证,因为这里没有输出。

I am trying build an automated testing framework for some of our internal web services (java) at work. Each service has a set of APIs (3-5), although this could be relatively easy to achieve, the problem comes with some APIs which do not behave as pure functions, ex: something like persistX, this could store something in a database and returns an exception incase of failure. There is no easy way to validate since there is no output here.

所以我在想,如果这可以一个有点一概而论,说在测试的API,用户可以提供一个简单的插件或脚本,以某种形式,可以验证测试的框架。这只是一个想法,将是巨大的,如果有人能告诉我同样的一些更好的或任何资源。

So I was wondering if this could a a bit generalized, say while testing the API, the user could provide a simple plugin or script to the framework of some sort that could validate the test. This is just one idea would be great if someone can tell me some better ones or any resources about the same.

感谢

推荐答案

我推荐的机器人框架。它是用Python编写的一个关键字驱动的框架。正因为如此,你可以在Jython中的JVM,这意味着你可以用java code(或Python,当然)扩展它运行它。我已经成功地用它来调用的API,然后通过窥视到一个数据库,或查询文件系统验证结果。

I recommend the robot framework. It is a keyword driven framework written in python. Because of that, you can run it in the JVM with jython which means you can extend it with java code (or python, of course). I've sucessfully used it to call APIs, then verify the result by peeking into a database, or querying the file system.

它也可以在.NET平台上,具有用于测试前端,詹金斯插件,和其他一些工具,硒模块。这是很好的可扩展性和灵活性。

It also works on the .NET platform, has a selenium module for testing the front end, a jenkins plugin, and several other tools. It's very extensible and flexible.

这篇关于自动测试框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆