Tag Info

Hot answers tagged

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 ...


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

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

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

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

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

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

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

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

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 ...


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

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 ...


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

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. ...


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

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

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. ...


2

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, ...


2

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 ...


1

In Technical Perspective Working code is better than anything. You can have a working solution and re-factor it going forward Do you have any solution options ? What Challenges do you have implementing it? Solution perspective Options Operations would be CRUD (Create, Read, Update Delete). For each one you need to have the previous state setup and ...


1

What you appear to be asking is if there is an automated way to reduce redundant defect reports before a human reviews them. First, look at the opportunity costs associated with that approach: How much time does it take a person to review each report and perform an initial triage? For a person familiar with the existing defects, product function, and code ...


1

I'm not aware of any standard methods for determining which bug reports are duplicates. That said, the method I use works more or less this way: Group and categorize - I start by looking at where in the application the problem occurs and what kind of problem it is. It helps here to have some knowledge of the source code: if you know that problem X occurs ...


1

Alex, You might want to look at some of the answers to this question: What are some good approaches to separating test data from test scripts? It's not specifically aimed at unit tests, but the general principle is similar. If your unit test framework doesn't support a data source attribute or declaration, you could design your own method of using ...


1

If it were me, I would use a bash or python script that reads from a properties file and reads/executes each query from the file and prints the query string and its return value (your link says Jenkins has email notifications, which is good for this) Then show the DBA how to edit the properties file to add/edit/remove queries. I would think it would be ...


1

No magic bullet. If you have a "multi-tenant" schema -- a schema that represents multiple, independent sets of data -- you may be able to run each concurrent test in a different data set. It is hard to be more specific about this without knowing more about your database, but here is an example. Consider an application as a service for managing ...


1

Selenium WebDriver itself cannot be used to test databases, but the language you are using to code your WebDriver tests (eg. C# or Java, etc.) can.



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