Tag Info

Hot answers tagged

9

For the most part, I've gotten by with running simple SELECT queries with various WHERE filters. With my current position, though, I'm finding that adding more complex JOINs are necessary to really get what I need out of the database. I think you are answering your own question here. Basically - "it depends". Sometimes the position requires just a ...


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


8

Like Sam points out experience with SQL and/or with MySQL will greatly depend on the project and/or the company with whom you hope to work. SQL skills are one aspect of Software Testing that focuses specially on technology. James Bach, an expert in the field of Software Testing with 20+ years experience, published a Tester's Syllabus for those who are ...


5

Another approach that might help with the portability is to run you SQL from an application test harness. If you use the SQL inline with this you have the ability to take the exe to any installation and just run it. To expand on using a testing framework there are several really good articles on Simple Talk about Unit testing sql code. They are good ...


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

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

A reply equally broad as the question, but that does answer it: Go to https://www.testtoolreview.de Filter tools based on your specific situation Compare the available options on specifications that matter to you Pick a winner You should research a bit more before asking generic questions like that.


3

SQL is specific to the project you're working on. Knowledge of SQL may or may not be applicable to a SQA position. I would say there are probably more SQA positions than not that don't have that requirement. The most important thing for an SQA position is logical problem solving skills. Especially for entry level SQA positions most of the focus will be ...


3

Visual Studio 2010 has some built in tools for unit testing SQL server. This article is a good read: http://blogs.msdn.com/b/atverma/archive/2010/07/28/how-to-unit-test-sql-server-2008-database-using-visual-studio-2010.aspx I know that Red-Gate also has some good tools for testing SQL server, especially around comparing tables or results of queries from ...


3

To motivate a point, I will describe two scenarios from a math class. First, think back to when you took math tests in school. Sometimes your teacher asked you to check your work. One way to check your work is to calculate everything twice, but of course if you miscalculated because of a misunderstanding, you will probably get the same, wrong answer ...


3

Use an established free open source framework like tSQLt? See tSQLt.org for more details. Tests are implemented as stored procedures and the framework is included as part of the database.


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

Proficiency in SQL is just a start, there is something more that just being competent with the SQL syntax: Select, From, Join, Where, Order by, etc. A good Software tester in a job requiring DB skills needs to be willing to learn from the Developers and DBAs in the shop. The tester should want to refine and improve their DB data mining skill continuously. ...


3

If I am looking for a tester for either a database or for a heavily data driven application then the stronger they are with SQL the better. I think not only should they be comfortable with writing queries including JOINS, UNIONS etc, but they need to have a good understanding of what some of the different performance implications are around inserts and ...


2

If you work in a company using intensively with SQL databases, like in enterprise systems or online shops, you will very likely need at least basic skills in SQL, at least to create some test data in the database, to check results and so on. At least some DML knowledge, SELECT, INSERT, UPDATE, DELETE, will come handy sooner or later. But keep in mind it's ...


2

Turns out this was easily done using the LINKS table - here's an example of query to retrieve all the RUNS a bug is associated with: SELECT DISTINCT LN_BUG_ID as BugId, LN_ENTITY_ID AS EntityId FROM td.LINK WHERE LN_ENTITY_TYPE = 'RUN' UNION SELECT LN_BUG_ID, ST_RUN_ID FROM td.LINK INNER JOIN td.STEP ON LINK.LN_ENTITY_ID = STEP.ST_ID WHERE LN_ENTITY_TYPE = ...


2

In my experience, something like a csv compare can be done programmatically without too much of a speed hit - so long as there aren't many errors. The way I'd handle it is to have your baseline CSV files being the data you expect each table to contain, one for each table (excluding any timestamps or other time-sensitive data - you'd need to check that ...


1

Try using SchemaCrawler. SchemaCrawler is a free and open-source command-line tool that produces text (text, JSON, CSV, HTML) output that is designed to be diff-ed, using standard diff tools. It can compare both structure and data. Sualeh Fatehi, SchemaCrawler


1

It sounds like the majority of your issue is in creating the connection to your Database. However, you lack to mention the type of database so I will try and cover some of the more popular ones. Oracle Tutorial or SO Question SQL Server JTDS I could list all of the types of databases for years so here is a list of database related tutorials. If you need ...


1

This is a very common scenario. Sometimes there are ways to increase the speed of the requests by identifying problems with the route taken, but that requires traceroute and working with network admins and internet providers and is often a bit of a black hole. Often you can not fix the latency issues, so you need to fix your app to function as well as it ...


1

I found an open source command line tool that can compare databases, csv, xml etc. http://www.diffkit.org/


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

First: You have md5 encrypted passwords. When it is theoretically no way of decrypting md5 encrypted password there is a way to decrypt a MD5 hash, using a dictionary populated with strings and their MD5 counterpart. As most users use very simple passwords (like "123456", "password", "abc123", or in your case 's'), MD5 dictionaries make them very easy to ...


1

I would suggest for any security related testing you start with OWASP: https://www.owasp.org/index.php/SQL_Injection OWASP have excellent overviews and descriptions as well as concrete guidance on testing and mitigation for most common classes of vulnerability.


1

In Linux you could write a bash shell script to load a database so you are at a known place for your testing. In windows you could use PowerShell to do it quite easily for MS SQL. There should be automation options for all the mature databases. As you don't specify your OS or database more specific help is unlikely. A sane thing you might consider doing ...


1

I believe this article gives a good overview of the different data warehouse testing that should be applied: http://quality-gates.com/?p=1284 We are using this method in almost every data warehouse project.


1

Srihari... I'm also relatively new to QC. With regard to querying the QC DB, mostly I retrieve BUG data, and learned primarily through trial and error in the Dashboard module. Initially, I didn't know which columns to include so I just did a query to select * from BUG where bg_bug_id = <some bug ID I had logged> Essentially, my base query on BUG is ...


1

I found this to be a useful, though high level article about data validation. It's more about how to approach the testing than specific tests, but it does contain some specific tests and has a lot of useful information: http://msdn.microsoft.com/en-us/library/gg261774.aspx


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



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