Questions tagged [database-testing]
84 questions
2
votes
3 answers
What is good way of doing Database Unit testing
We are using Power Designer for Database Modelling and whenever something is changed in model
(column name, datatypes etc) have go back and test all depended stored procedures and fix them accordingly.
What would be the best tool to do unit testing…

Sreedhar
- 29,307
- 34
- 118
- 188
2
votes
2 answers
Unit Testing and Integration Testing examples
I have created following four tests in a Test class that tests a findCompany() method of a CompanyService.
@Test
public void findCompany_CompanyIdIsZero() {
exception.expect(IllegalArgumentException.class);
…

bhootjb
- 1,501
- 1
- 21
- 33
2
votes
2 answers
Suggestions to avoid DB deps when using an in-memory sqlite DB to speed up unit tests
I've been using sqlite::memory: for unit tests: it is quick, and makes test clean-up automatic. But I'm concerned my tests could be missing bugs due to SQL server assumptions. (This particular code is supposed to be DB-neutral, but pragmatically it…

Darren Cook
- 27,837
- 13
- 117
- 217
1
vote
0 answers
Run PDO SQLite Query On In-Memory Database On Github Actions
I use PHPUnit to test by PDO wrapper. One of my tests is an integration test that proves that the abstraction layer produces the right syntax, or binds PDOStatement in the right way, etc. For this, I use an in-memory SQLite database, and declare…

XedinUnknown
- 677
- 9
- 25
1
vote
1 answer
How to store a result of SQL query as String in python
I am using Robot framework in python and I am running below query:
${queryResults1}= query select count(*) from table
It gives me below result:
${queryResults2} = [(91,)]
How to convert above result as String?

Dilip
- 55
- 1
- 1
- 8
1
vote
2 answers
How to do performance testing in Non-Prod when Non-Prod DB size is comparatively very small or different than Prod DB size?
I did performance testing using Jmeter in QA and the number of records in QA DB were 30-40 times less than number of records in Prod DB.
For above reason, the performance in QA was very good but when application released in Prod, the performance…

astar
- 111
- 2
- 12
1
vote
1 answer
How we can implement Cucumber test for database testing
I am trying to configure Cucumber test for database testing since my application have some rest services and I need to check the database in order to verify the records are updated with proper value.
I am using Postgres database. I have a feature…

Pranjal Prakash Srivastava
- 197
- 1
- 3
- 20
1
vote
2 answers
Could not open JDBC Connection, Unable to get managed connection for java during load test
Noticed below error during load test with multiple users and not in case of single SOAP request.
Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get…

Akt
- 11
- 1
- 1
- 4
1
vote
1 answer
Create XML dataset with the same table name as initial data set in DBUnit?
I'm trying to create an initial DB state in DB Unit like this...
public function getDataSet() {
$primary = new \PHPUnit\DbUnit\DataSet\CompositeDataSet();
$fixturePaths = [
"test/Seeds/Upc/DB/UpcSelect.xml",
…

Allenph
- 1,875
- 27
- 46
1
vote
3 answers
Is it ok to hit the database in integration tests?
I have a very specific situation in an integration test.
I'm developing a Rest API composed by few micro services using spring boot. Some of those services have basically crud operations to be accessed by an UI application or to be consumed into…

pedrohreis
- 1,030
- 2
- 14
- 33
1
vote
2 answers
JMeter JDBC database testing - Max Wait (ms)
What is the best practice for Max Wait (ms) value in JDBC Connection Configuration?
JDBC
I am executing 2 types of tests:
20 loops for each number of threads - to get max Throupught
30min runtime for each number of Threads - to get Response…

Samuel
- 95
- 1
- 9
1
vote
1 answer
PHPUnit loads too many fixtures
I have some PHPUnit test classes which use fixtures. I have for 10 tables fixtures defined. Directory structure:
tests
fixtures
table1.php
...
table10.php
unit
MyTestClass.php
I now have a test class…

physicalattraction
- 6,485
- 10
- 63
- 122
1
vote
0 answers
Necessity of NoSQL database testing
I have a web server application using Couchbase Server as its backend database.
Application comprises of few set of REST API's.
Now I have tested all my REST API's properly and deeply for all the scenarios, now I am in a dilemma if I should test my…

Rohit Jindal
- 679
- 1
- 10
- 21
1
vote
2 answers
which s best way to test the database packages?
I am currently working on a project where we need to test the database packages and functions.
We need to provide the input parameters to the database package and test the packages returns the expected value, also we want to test the response time…

Nikunj Aggarwal
- 754
- 2
- 12
- 32
1
vote
1 answer
Integration testing framework for applications written in multiple languages
Query already asked at link
For an enterprise application with huge source code repository which is written in C/C++/Java/JavaScript, for performance reasons. Application also uses relational Database mysql & key-value berkeley DB to store relevant…

overexchange
- 15,768
- 30
- 152
- 347