简体   繁体   中英

Can we script database testing using Selenium?

如果需要为使用 selenium 或手动测试的网站编写最少使用 SQL 的脚本来进行数据库测试就足够了?

Not selenium (a browser tester), but you could use JBehave .

You should be using JBehave (or similar BDD tool) to drive your system testing.

You could do it via unit tests, but I wouldn't because it requires a database to be present and that's typically outside the scope of a "unit test". No point in using a mocking framework either, because it;s the database you want to test, not the code calling it.

We use TSQLT. It a unit test framework but I use it as an e2e test automation tool. You can fake tables in Stg, ETL and target. Then you can write scripts that perform inserts, updates, deletes etc., run stored procedures and then compare expected vs actually results. Work pretty well and easy to use

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM