Hot answers tagged

9

No. The items you mention scale very differently and there are far too many factors and resources that will get used. For instance if I time requests on a local server using an application I'll find things like 1 user = 10 second response average (time per request) 10 users = 2.5 second average 100 users = 2.5 second average 1000 users = 20 second average ...


9

Does this actually catch, before production, many of the "surprise" problems we might anticipate? Or is there a more fundamental flaw in the approach that will cause deleterious changes to pass testing and affect production? You are wise to have a test system that you can use for catching performance issues, but your "scaling" approach is flawed. ...


8

Your application uses an API to interact with the database. It is possible to write your API in such a way that it presents correct results to the application and yet still uses the database in the wrong way. For example, imagine a database with an EMPLOYEE table and a MANAGER table. The tables are alike -- e.g. each contains a first name, last name, ...


7

See if your test framework gives you a way to parameterize tests. Many test frameworks allow you to supply the values using a "data provider" method or object or class that you write yourself. If you have a framework like that, see if you can use its data provider mechanism to supply the values. The usual mechanism is that your code fetches the values from ...


6

Wouldn't any data inconsistencies expose themselves in the application itself? Maybe, maybe not. I've seen cases where applications lost some data after you've logged off. So while the UI looked fine, the database was actually incorrect after logoff. In addition, are you sure that every single element in the database is being displayed in the UI ...


5

Presumably the database is just a piece of your overall system, and your goal is to determine whether database changes break things or slow the system down. Using a downsized database is a reasonable way to check whether database changes break things. I'm not sure it makes sense to use a downsized database for load testing. Whether this makes sense ...


4

If you only need rough precision, the dump method is crude but does get the job done. If you want a lot of precision, I have done a similar task using Python's SQLite module. (http://docs.python.org/library/sqlite3.html) I grabbed and directly compared alike rows in each table and wrote out changes to a file, with further post-comparison and UPDATEs ...


4

Injection Attacks can be thought of as a generalized version of SQL Injection Attacks. Any attack which uses techniques similar to SQL injection to insert characters in the front end to invoke unexpected actions on the back end can be thought of as an Injection Attack. Consider what kinds of escape characters, improper type handling, etc could make their ...


4

There's two major directions you can take here. If your tests are structured such that one test covers a full user scenario (By this I mean that a single test covers something like log on as user X, navigate to ordering, select quantity A of product B, quantity C of product D, check out, pay with card details Y and check that all the amounts add up ...


4

Welcome to SQA, Rumi P. It sounds like you have a bootstrap problem rather than a chicken-and-egg problem. There is nothing intrinsically wrong with using software under test to create your test data, especially if it lets you write and maintain tests more easily. Of course if you don't implicitly trust your Linq classes, you should test them. One way ...


4

I don't want to repeat great answers other have provided, but I would like to share with one more lesson I learned about using database in tests. Combining feedback you have from both database assertions and UI assertions, often in one test, can be very useful for test case design, test execution performance and defect root cause isolation: If you spot ...


4

In addition to user246's excellent example, some other cases where you'd want to validate the database storage in your scenario would include: You have a bulk update/insert function where it's impractical to validate the results via the front end, such as importing new user records from a CSV file. While you can go in through the front end and check that ...


3

Welcome to SQA. As @user246 says, there's nothing intrinsically wrong with using your application under test to generate your test data - although you probably do want to have tests that validate the data you generate that way. While you technically don't need to have test data reflecting real usage conditions there are times and cases where this is a ...


3

Based on your response to my comment, you're not actually looking to test database operations but an application that employs the operations. That makes things a little simpler. If you have access to the data store - the simplest method you can use is to perform an operation with your application and treat the data store as an oracle for verification ...


3

Microsoft has sample databases for exactly this purpose: http://www.microsoft.com/en-us/download/details.aspx?id=23654 http://msdn.microsoft.com/en-us/library/ms124501%28v=sql.105%29.aspx There are tons of samples, tutorials and training online that all use these sample databases. It sounds like everything you want from above could be done with these and ...


3

I have always loved using Scooter Software - Beyond Compare (limited to 2 links) to visually compare between folder, files etc. Group of them or single. This should help with an easy to use Visual Compare. Daniel has created a great BC File Extension Forum Link | How To on GitHub. It uses simple export with command line to do compare SQLite DB. I ...


3

I would list down based on my previous experience - Replication Test Effort using SQL Server. My scenario was Transactional Replication. I am not aware of Postgress DB but there should be simlar jobs equivalent to jobs/monitors provided in sql server. What all areas to test Initial Setup Configuring Replication, Running Replication Scripts on the ...


3

Siva, If your database structure is changing this often, I'd be cautious about automating validation until the structure stabilizes. Typically, early in a development process, the database structures will change frequently (sometimes daily with a large application undergoing rapid development with multiple development projects). During this period, it ...


3

It's hard to provide input on your specific processes, but here's how I generally deal with Selenium automation. Maybe it can help you out. One separate database which contains all the data for the tests: data-driven testing. This means you'll likely have to compose Views (combining tables as necessary) which serve as the datasource for test methods. ...


3

This is a really interesting question. I don't think we're entirely happy with our approach, and we discuss it regularly, but these are our constraints and what we've done so far (framework has been in use for about 3 years). 1) We reload a skeleton database at the start of each test run. This has a minimal set of data, as little as possible - a user, ...


3

Selenium itself is only a framework to drive web-browsers, but you can combine it with some code to check and or manipulate the database the application under test uses. If you use Selenium with a programming language then you can use the same language in combination with a database library to access and change the database. Supported databases depend on ...


3

Look into: SQL Injection Load Test (may expose max connections and/or slow queries) Boundary testing


2

To prevent overwriting the earlier results, you can specify where you want the logs and results with command line options --output, --log (-l) and --report (-r). There is also an option --timestampoutputs (-T) for automatically timestamping the result files to get output-20080604-163225.xml or similar. There seems to be at least two database libraries ...


2

The problem with general approaches is they are just that - general. That may or may not relate to you at all. So the most important thing is to understand or be prepared to learn as much as you can about the underlying system and software - in your case Postgres and some flavor of *nix. I, like Siva, have tested replication on SQL Server using ...


2

While you need DB instance for SQL training purposes, you can look at small solution like SQLite http://sqlitestudio.pl/?act=download . Off course it can't be compared with Oracle or MS SQL Server. But it has enough functions for SQL trainings and you can easy create/restore structure from previously created SQL Script. Maybe you can use it for small ...


2

In addition to what Dale proposed, it is also possible to encode test data in Java. This will satisfy all your requirements: Modifiable from outisde the test code. If you defined your test data in separate Java classes, you do not need to compile them together with test script classes. You can link them at runtime as Java Beans, e.g. using Spring. ...


2

Since this question was cross-posted to stackoverflow, I'll cross-post my answer: Unfortunately, the use of test templates more-or-less require that the data is hard-coded in the test case. However, the test template is not much more than a wrapper around a for loop. You could do something like this: | | ${database_rows}= | Run sql query | | ... | Select * ...


2

Database can be tested various ways, If we are using SQL server then open the SQL query analyzer and write the queries to retrieve the data. Then verify whether the expected result is correct or not. IF not the data is not inserted into database. We can play with queries to insert, update and delete the data from the data base and check in the front end of ...


2

As UI tests are slowish I think its important to be able to run them in parallel. In order to be able to run them in parallel your data-management becomes even more complex, since if the tests use the same data-source they could change data into conflicting states and make tests randomly fail, that why the tests should all run in isolation. Currently I am ...


2

Selenium Webdriver is a web test automation framework and primarily used for functional testing of front-end part of the application (that piece, that the user sees in his/her browser). Since this framework is open source and can be relatively easily extended, someone could have already implemented some additional libraries for interacting with database. ...



Only top voted, non community-wiki answers of a minimum length are eligible