86 questions
0
votes
1
answer
25
views
Create two types of session to the database. One for testing and one for other use
I just have a question that how can I create 2 type of session fixture to connect to the database using SQLAlchemy.
@pytest.fixture
def session_function_scope():
engine = create_engine('sqlite:///:...
0
votes
0
answers
571
views
Playwright Test Not Running with Postgres database connection using pg package
I'm facing an issue with Playwright tests. I have a separate module, db-connection.ts, for connecting and querying a PostgreSQL database using the pg package. Here's the relevant code in db-connection....
-1
votes
1
answer
58
views
How do I sum corresponding values of distinct records
So I have to write a query for a table grouping by 5 columns and fetch the sum of one of the columns based on the grouping.
Now, in the database I have duplicate records. So I am getting incorrect sum....
1
vote
0
answers
20
views
How to compare skewed performance data?
I'm performing a database performance test on a virtual machine such as virtualbox machine or kvm VM. My test is like this:
I run ten times, each run I insert 10000 row into database(let's say it's ...
0
votes
0
answers
267
views
Why doesn't Laravel in-memory testing work when seeding is enabled?
I recently upgraded an application to Laravel 9, and have in-memory testing set up for the unit and feature tests.
<env name="DB_CONNECTION" value="inmemory"/>
<env name=&...
0
votes
1
answer
123
views
JMeter creates a lot of compilations during database testing
I'm using a JMeter for MS SQL server performance testing.
I've been monitoring the SQL throughput metrics while manually clicking on elements on GUI - I've noticed that database is making close to 0 ...
0
votes
0
answers
69
views
Is there a possibility of unit testing database functions using cmocka?
I am trying to make some unit tests for database functions in C language, but i am not aware is it possible with cmocka?
I couldn't find any example on the internet for database testing using cmocka, ...
-1
votes
1
answer
259
views
How to capture the file upload, import timing and database performance testing in JMeter
I am trying to achieve two scenarios using JMeter. But I am facing some issues. Details are as follows.
Scenario 1 : I want to test the timings of text file upload and file import in my web ...
0
votes
1
answer
253
views
How to test file import timing scenario in JMeter
I came across one scenario to test in JMeter.
There are multiple text files with multiple line data and need to import those in web application.
I need to know
How much time taken by every line and ...
0
votes
1
answer
794
views
JMeter Unable to connect AWS RDS getting error java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure
I have to connect my JMeter script to AWS RDS database.
When I am running my test with the below JDBC Connection configuration it is showing this error message:
java.sql.SQLException: Cannot create ...
1
vote
0
answers
362
views
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 ...
0
votes
1
answer
647
views
How to define belongsTo relationship in Laravel factory?
I have a Post, User and Country model.
A Post belongsTo as User . A User belongsTo a Country.
Is there any way to call the User and Country factory from after the post factory ?
Sort of like
factory(...
1
vote
1
answer
549
views
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 ...
0
votes
1
answer
92
views
Java Spring Boot Testing with MySQL Database
My tests for this CRUD operation in Spring Boot continue to fail where I get "java.util.NoSuchElementException: No Value Present" I understand that testCreateDemographic is creating a record, however, ...
0
votes
1
answer
773
views
Database-rider. Exclude columns from the specific table
My expected dataset contains several tables. Is it possible to exclude columns from the specific table?
7
votes
0
answers
2k
views
How to perform unit testing on Postgres using SQLAlchemy in Windows?
I am working on a Flask app for APIs and created few Flask-SQLAlchemy models.
I have written a function which takes a list of dictionaries and insert them into Postgres database model tables as rows ...
2
votes
1
answer
871
views
How to close DB connections and reduce their number in functional PHPUnit tests for a ZF3 application?
Some years ago I already created a very similar or even nearly the same question on StackOverflow. I got great detailed answers, but they didn't lead to a solution of my problem. Now, the problem ...
0
votes
1
answer
613
views
FAILED: dbconnection com.microsoft.sqlserver.jdbc.SQLServerException: Could not find stored procedure while executing SQL query through Selenium
I have made the sql connection , and fetching the query from excel sheet.
and after establishing db cooncetion, calling:
result rs= st.executeQuery(query)
statement is showing error as couldnot find ...
1
vote
2
answers
541
views
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 ...
0
votes
2
answers
410
views
How to test @Transactional method, where two table are getting updated
I am trying to write a unit test for a method which uses:
@Transactional.
There are two methods are being called, each is running an update query on two table, if one fails other should not run or ...
2
votes
2
answers
2k
views
Testing unique constraint in @DataJpaTest
I wrote this test to verify unique constraint on Domain.name in the database. But it doesn't work: I expect an exception to be thrown on the domainRepository.saveAndFlush(domainDuplicate) operation, ...
14
votes
1
answer
14k
views
Does SQL Server support in-memory database?
I have basically a testing scenario, where I
Create database
Fill it with some data
Execute the business logic to be tested, which modifies the data. I don't own the business logic implementation or ...
1
vote
1
answer
23k
views
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.
...
0
votes
2
answers
7k
views
Unit testing a function that depends on database
I am running tests on some functions. I have a function that uses database queries. So, I have gone through the blogs and docs that say we have to make an in memory or test database to use such ...
1
vote
2
answers
35k
views
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....
3
votes
0
answers
665
views
PHPUnit DbUnit table not found
I'm getting a very strange error when running a unit test:
PDOException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.result' doesn't exist
/var/www/html/project1/rami/tests/...
1
vote
1
answer
512
views
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 = [
...
0
votes
1
answer
324
views
How to prevent application (using hibernate + c3po) from hanging if Mysql port is blocked?
I've been trying to make my Java application db fail proof, so that they are no unexpected lags if the DB is not available. I've successfully handled the easy case when the database is totally down.
...
-1
votes
1
answer
4k
views
How to generate output in different tabs for simultaneously executing queries in Oracle SQL Developers? [duplicate]
We are testing a table. There are 20 different tests to be done in the given table. So there are 20 different queries we execute. Is there a way that I run 20 different queries on the same table and ...
0
votes
1
answer
894
views
Mockito - Mock ReultSet
Here is my method under test as well as test code. My method under test depends on the result set produced by runExecuteQueryStatement. If the resultSet is null and resultSet.next is false it is going ...
0
votes
1
answer
420
views
How would you unit test a method whose only purpose to make a database call? [closed]
I have method something like this:
func (alert *Alert) CreateAlert(db *mgo.Database) error {
return db.C("alerts").Insert(&alert)
}
How should I unit test this?
If I just call this ...
0
votes
1
answer
236
views
How to validate elastic search data with sql data after migration from sql to elastic search
Anyone who have worked on elastic search. need input as mentioned in subject. I have one requirement in which sql data is migrated to elastic Search now there is ton of data so I can not check each ...
1
vote
3
answers
6k
views
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 ...
0
votes
0
answers
280
views
I am getting error Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
package GoldenGate;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.DriverManager;
import java.sql.SQLException;
public ...
2
votes
1
answer
1k
views
How to run Specflow/Specrun feature files with dynamic values
I am very new to Specflow/Specrun and C# programming. I need help in fixing the issue I am facing.
I have a Specrun feature file which queries database. Below is the code of the feature file:
...
1
vote
2
answers
2k
views
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 ...
0
votes
1
answer
221
views
Can tsqlt be used with parallel data warehouse?
Saw that CLR functions needed to be enabled to use tsqlt.
Can I actually use it in PDW ?
Or any other ways or tools to perform unit testing on PDW ?
Thanks,
2
votes
1
answer
1k
views
How to connect jmeter with database by using mysql-connector-java?
I am using phpMyAdmin version 5.7.15 and database mysql-connector-java version 5.1.40, but I am unable to connect the database with jmeter3.0. Could you please advise?
0
votes
2
answers
3k
views
JMockIt Mocked Method not Mocking
[10/7/06 4:00 Edited example code]
I'm trying to test some code (using JMockIt with TestNG) without touching the database, but it appears a mocked method is still actually called. Here's the ...
-1
votes
1
answer
126
views
CI / TFS and SQL Server database testing : schema validation with unit tests
What are best practices to perform the Schema-Validation in SQL Server ?
I need to test whether a views, stored-procedure, trigger of function points to an existent and working table (or any other ...
1
vote
1
answer
160
views
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
...
0
votes
1
answer
890
views
Changing datasets for each PHPUnit Test
i'm kinda noobie in PHPUnit Testing and I need to cover multiple scenarios of a method. The method takes the rows of a table and make decisions based on it, so if I have 0 rows matching my query, it ...
0
votes
1
answer
67
views
What is worth testing in an ActiveRecord model/entity?
I've just started with unit testing and I'm getting a bit confused and a bit overwhelmed when the subject is testing the models. I currently have some ActiveRecord models with setters and getters. ...
1
vote
0
answers
110
views
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 ...
0
votes
1
answer
830
views
Accessing same instance of an object in @Before and @After in a JUnit4 test
I'm using JUnit 4 for testing a database-application. Since each test requires a special preset of the database before it runs, I'm using the @Before method to load the data first and the @After ...
5
votes
1
answer
226
views
Rails databases, why use same DBMS for development and production?
I really can't seem to find an accurate explanation on why you should use the same database in development as in production. I personally love using sqlite3 in development (it's light, easy to use, ...
1
vote
2
answers
582
views
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 ...
0
votes
2
answers
2k
views
How to test database calls with testng in spring boot
I have created small web application in spring boot.I am new for TestNG. I am trying to test my services with testng which calls dao for database operations. I am trying to do it using inmemory ...
0
votes
2
answers
4k
views
Data Warehouse Testing Approach
I am working on testing space on Data Warehousing. In the scope I got newly created and dimensions and facts which should be validated. As per my knowledge and information got via browsing I would ...
2
votes
3
answers
2k
views
How can I do unit and database testing on a Laravel 4 package?
I am developing a package link here for Laravel 4.2. I want to write unit tests and database tests. As far I read I have to create an instance of Laravel app in order to use all the features in ...