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


5

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

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

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

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

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


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


1

Yes, it's possible and in two different ways. AST Using the Administrative Task Scheduled (ATS) built inside db2 to execute scheduled operations. Command Line the db2 command can also read command from a file specified from the command line The two solution have both pros and cons: the setup of the AST solution requires administrative privileges on ...


1

From application perspective you need to look at below states for DB to be validated with basic cases Clean up Scripts (Clearing Previous Run Data) Initial Data population (From a fresh install whatever initial configuration you need to do) Prerequisites Validations Tests (Checklist to validate before you start run - Services up / DB's accessible, able to ...


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

RedGate offers a suite of tools to help with DB comparisons: http://www.red-gate.com/products/sql-development/sql-compare/ There is a tool to compare schemas from different DB's as well as a tool to compare the data from tables or from the result of a query. We use the data compare tool every time we update our database to ensure that queries often done by ...


1

this link will not put your mind at ease but might be a starting off point for you ( google Cassandra security for more ideas )


1

That sounds basically right. The only change I might make is instead of loading up to a CSV, you can just take a mysqldump and load the DB from the dump at the beginning of the script.


1

As a previous answer stated, it is possible to save the test output as XML (output.xml) but to put the results into a database, you would have to create a parser and table structure to handle all that. If you are just wanting to have the test results stored in a central place then I would recommend setting up Jenkins and running your Robot Framework tests ...


1

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



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