9 Answers
- Use an isolated database for unit testing (e.g. No other test runs or activity)
- Always insert all the test data you intend to query within the same test.
- Write the tests to randomly create different volumes of data e.g. random number of inserts say between 1 and 10 rows.
To test Trigger, we need to execute the SQL query embedded in the trigger independently first and record the result. Then execute the trigger as whole and Compare the results. Triggers are useful for enforcing business rules, validating input data, and keeping an audit trail etc.
Tools which enable you to regression test your database.
- AnyDbTest.
- DBFit.
- DBUnit.
- NDbUnit.
- SQLUnit.
- TSQLUnit (for testing T-SQL in MS SQL Server)
- Visual Studio Team Edition for Database Professionals includes testing capabilities.
- XTUnit.
Unit tests verify the logic of a
SQL query by running that
query on some fixed set of inputs.
In a test query, you specify:
- The query you're testing.
- The faked inputs, each labeled with their referenced name.
- The expected output of running the query on the faked inputs.
Steps to data validation
- Step 1: Determine data sample. Determine the data to sample.
- Step 2: Validate the database. Before you move your data, you need to ensure that all the required data is present in your existing database.
- Step 3: Validate the data format.
A Microsoft Excel spreadsheet or Microsoft Access are good examples of desktop database programs. These programs allow users to enter data, store it, protect it, and retrieve it when needed.
Database Testing – Data Integrity
- You need to check major columns in each table and verify if any incorrect data exists.
- Find out inconsistent data and insert them into relevant tables and see if any failure occurs.
- Insert a child data before inserting its parent's data.
Best API Testing Tools for 2020 (Updated list)
- SoapUI. SoapUI is a headless functional testing tool dedicated to API testing, allowing users to test REST and SOAP APIs and Web Services easily.
- Postman.
- Katalon Studio.
- Tricentis Tosca.
- Apigee.
- JMeter.
- Rest-Assured.
- Assertible.
In back end testing, you are not required to use the GUI; you can directly pass the request through some browser with the parameters required for the function and get a response in some default format. Example, XML or JSON. You also need to connect to the database directly and verify the data using SQL queries.
API test actions
- Verify correct HTTP status code. For example, creating a resource should return 201 CREATED and unpermitted requests should return 403 FORBIDDEN, etc.
- Verify response payload.
- Verify response headers.
- Verify correct application state.
- Verify basic performance sanity.
API testing is a type of software testing that involves testing application programming interfaces (APIs) directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security. Since APIs lack a GUI, API testing is performed at the message layer.
Best API Testing Tools for 2020 (Updated list)
- SoapUI. SoapUI is a headless functional testing tool dedicated to API testing, allowing users to test REST and SOAP APIs and Web Services easily.
- Postman.
- Katalon Studio.
- Tricentis Tosca.
- Apigee.
- JMeter.
- Rest-Assured.
- Assertible.
For each API request, the test would need to take the following actions:
- Verify correct HTTP status code.
- Verify response payload.
- Verify response headers.
- Verify correct application state.
- Verify basic performance sanity.
FUNCTIONAL TESTING is a type of software testing whereby the system is tested against the functional requirements/specifications. Functions (or features) are tested by feeding them input and examining the output. Functional testing ensures that the requirements are properly satisfied by the application.
* Admin Panel:
- Admin Panel Login Screen: Enter wrong credential and check the behaviour of the page.
- Check for the validation messages spellings and text.
- It should perform an action by tapping a key from keyboard.
- Do the Sign In and Sign Out in admin panel and check the behaviour in all browsers.
Backend Validations
The back end validation code not only checked, independently of the frontend, that the user has sufficient funds but also validated the real system ID of the user (using a security token/header passed along with the request) as well as the corresponding source account for that user.With increasing data complexities, heterogeneous environments and data sizes in terabytes, it is really difficult to form a testing strategy based on manual testing. In these cases, test automation can help perform data validation, schema verification, database health check, security checks, etc.
Most Popular ETL Testing Tools
- RightData.
- Informatica Data Validation.
- QuerySurge.
- ICEDQ.
- Datagaps ETL Validator.
- QualiDI.
- Talend Open Studio for Data Integration.
- Codoid's ETL Testing Services.
Difference Between Load and Stress Testing
| Performance Testing |
|---|
| Scope | Very wide scope. Includes - Load Testing, Stress Testing, capacity testing, volume testing, endurance testing, spike testing, scalability testing and reliability testing, etc. |
| Major goal | To set the benchmark and standards for the application. |
To test the connection to your database, run the telnet hostname port on your Looker server. For example, if you are running MySQL on the default port and your database name is mydb, the command would be telnet mydb 3306 . If the connection is working, you will see something similar to this: Trying 10.10.
Application Level Validation testing ensures smooth running of the migrated application with the new database using following validations:
- After migration, log in to the new application and verify a sample data set.
- After migration, log in to legacy systems and verify the locked/unlocked status of accounts.
Below are some of the tips and tricks to create test data:
- Always make sure that Test data files are not corrupted.
- Test Data should be updated on a regular basis.
- Test data should be created before test cases execution to save time and meet deadline.
A TEST PLAN is a document describing software testing scope and activities. It is the basis for formally testing any software/product in a project. ISTQB Definition. test plan: A document describing the scope, approach, resources and schedule of intended test activities.
How to write test cases for software:
- Use a Strong Title.
- Include a Strong Description.
- Include Assumptions and Preconditions.
- Keep the Test Steps Clear and Concise.
- Include the Expected result.
- Make it Reusable.
- Title: Login Page – Authenticate Successfully on gmail.com.
- Description: A registered user should be able to successfully login at gmail.com.
What are ways of writing test cases for database testing?
- Understand the functional requirement of the application.
- Find out the tables used, joins used between tables, cursors used, triggers used, stored procedures used, input parameters used and output parameters used.
- Write the test case with multiple input values for checking all paths.