Questions tagged [database-testing]

84 questions
3
votes
2 answers

Generating dummy data for my web application - looking for dictionaries

Sorry if this is off topic - but it is certainly programming related. I need to test my web application at scale (concurrent users and amount of data in system). For the latter, I need some way of generating dummy data for a variety of types (name,…
calumbrodie
  • 4,722
  • 5
  • 35
  • 63
3
votes
1 answer

PHPUnit Database Testing. Fixtures not set?

this post was updated on 17 July 1:35PM UTC+8 I have something like require_once 'PHPUnit/Extensions/Database/TestCase.php'; class TestTest extends PHPUnit_Extensions_Database_TestCase { public function getConnection() { $pdo = new…
JM at Work
  • 2,417
  • 7
  • 33
  • 46
3
votes
1 answer

Microsoft demo database copyright, open source demo databases?

In my open source project which is licensed under LGPLv3 I need a small demo database. Project targets multiple databases so for consistency of tests it would be great to have some simple SQL script with same demo data for all databases. There is a…
Petr Abdulin
  • 33,883
  • 9
  • 62
  • 96
3
votes
0 answers

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/Data/Models/DataImportTest.php:60 The test code in…
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
3
votes
6 answers

How to delete all database data with NHibernate?

Is it possible to delete all data in the database using NHibernate. I want to do that before starting each unit test. Currently I drop my database and create it again but this is not acceptable solution for…
mynkow
  • 4,408
  • 4
  • 38
  • 65
2
votes
1 answer

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 became even bigger and I'm starting the second…
2
votes
2 answers

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, but the test ends…
2
votes
1 answer

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: Scenario Outline: Ensure all rows are correctly inserted…
user1493004
  • 101
  • 2
  • 2
  • 6
2
votes
1 answer

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?
2
votes
1 answer

How to populate a test database in Android?

I have a test class that extends ProviderTestCase2<>. I would like to populate this test class database with data from some .db files. Is there some particular method to push some .db file into the Mock Context of a ProviderTestCase2? Otherwise…
Giorgio
  • 13,129
  • 12
  • 48
  • 75
2
votes
3 answers

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 testing. I did a modification on composer.json and…
Robert Gabriel
  • 1,151
  • 12
  • 24
2
votes
2 answers

Can I flush my NHibernate session and get a new session without committing the transaction?

I'm using Castle ActiveRecord for persistence, and I'm trying to write a base class for my persistence tests which will do the following: Open a transaction for each test case and roll it back at the end of the test case, so that I get a clean DB…
2
votes
1 answer

JMeter Nested Variable Reference with JDBC Resultset Variable and Counter Variable

I need to query a MYSQL Database for a list of siteIDs and siteURLs. I've specified these names in the JDBC Request's Variable Name field. Then I created a ForEach Logic Controller to cycle through the siteURLs ${siteURL_1} till the last record from…
2
votes
1 answer

Db unit tests. Constraints disabling

I have a set of unit tests which test my DAO layer. I have following requirements: - For one subset of tests I need to disable constraints(foreign key, unique, not null). - For other subset I need to remain their (I check data integrity here). So…
mvb13
  • 1,514
  • 3
  • 18
  • 33
2
votes
2 answers

Issue with mysql connection while running JUnit test with play2 framework

I'm currently creation JUnit test for a play application. The problem comes when I try to use FakeApplication. I create one in JUnit test but when a test uses the fakeApplication instance, then I got this: [error] Test…