您的组织如何设置测试数据? [英] How does your organisation setup testing data?

查看:157
本文介绍了您的组织如何设置测试数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是将Web服务作为关键应用程序的组织的测试人员.当前,我们通过Web前端加载大量测试数据,因为这是在现实世界中的处理方式.

I work as a tester for an organisation that has a web service as it's critical application. Currently we load massive amounts of test data through the web front end, as this is how it would be done in the real world.

这使数据具有一定的合法性,并防止了数据格式的错误.但是,以这种方式加载数据非常耗时,我经常想知道将数据直接加载到数据库是否会更有效率.

This gives the data an amount of legitimacy and prevents errors in the format of the data. However it is very time consuming to load the data in this way and I often wonder if loading data directly to the database would be more productive.

其他人有这个决定,您选择了哪个选项?还有另一种解决方案可以同时提高数据的速度和合法性.

Have other people had this decision, which option did you opt for? Is there another solution that would give both speed and legitimacy of the data.

推荐答案

这是从开发人员而不是测试人员的角度出发的,因此它可能适用也可能不适用.

This comes from a developer's perspective rather than a tester's, so it may or may not apply.

我不能代表整个组织,但是在我们的项目中,我们花了一些时间来创建类似于真实世界"的数据,然后使用SQL脚本将其加载到测试数据库中.这些数据是来自生产环境的真实数据和经过量身定制的数据的组合,这些数据代表了我们产品中的特定问题情况".

I can't speak for the organization as a whole, but in our project we have spent some time creating "real-world-like" data that we load into the test database using SQL scripts. This data is a combination of real data from the production environment and data that is tailored to represent specific "problem situations" in our product.

这些脚本会在构建我们的软件时自动运行,并由单元测试框架驱动的自动集成测试使用.这些测试将测试通过各种可用接口的发现,创建,编辑和删除数据.

The scripts are run automatically as part of building our software and are used by automated integration tests, driven by a unit testing framework. These tests will test finding, creating, editing and deleting data through various interfaces that are available.

在这样的构建和测试运行期间,多次重置测试数据库并重新加载数据.这样做是为了消除测试之间的依赖关系.一个测试不应依赖于另一个测试创建或修改的数据,并且还因为某些测试的数据可能与其他测试的数据不同.不过,大多数测试都是基于相同的测试数据执行的.

During such a build and test run the test database is reset and reloaded with data on a number of occasions. This is done in order to remove dependencies between tests; one test should not rely on data created or modified by another test, and also because the data for some tests might differ from that data of other tests. A majority of all tests are executed based on the same test data though.

设置(并维护)测试数据一直(有时是)有些令人头疼,但从长远来看,在我们的案例中效果很好.

Setting up this test data (and maintaining it) has been (and is sometimes) somewhat of a headache, but in the long run it has worked well in our case.

这篇关于您的组织如何设置测试数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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