問題タブ [database-testing]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
unit-testing - DBUnit の初期データ セットと同じテーブル名で XML データセットを作成しますか?
このようなDBユニットで初期DB状態を作成しようとしています...
次に、クエリの後、このユーザー定義関数を呼び出そうとしています...
ここでの考え方は、DB の初期状態を取得し、クエリを実行してから、実際のテーブルの状態を、テーブルがどのように見えるかを表す XML データ セットと比較するというものです。このプロセスはPHPUnit の DBUnit のドキュメントに記載されていますが、例外がスローされ続けます...
PHPUnit\DbUnit\InvalidArgumentException: There is already a table named upc with different table definition
テスト例...
私はドキュメントに従っているようです...これはどのように行われるべきですか?
php - 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 question (simplified to try to isolate the problem):
What's even more strangely is that assertions in other tests that use assertTablesEqual
run and pass fine, it is only this test that is failing. PHPUnit appears to be introspecting a table on the database called "result" when creating the expected table (which does not exist on the database), but it doesn't do that for any of the other tests.
I have tried dropping the database and recreating it, reloading the dev/test environment (a Vagrant box), and even reprovisioning the Vagrant box with a fresh install of MariaDB, all without success.
Googling the error only shows Laravel related problems, with a small handful of similar problems in other PHP frameworks, but nothing related to testing.
The implementation works fine as far as I can tell, and running the query manually on the test database doesn't cause any error.
Any ideas?
sql-server - SQL Server はメモリ内データベースをサポートしていますか?
私は基本的にテストシナリオを持っています。
- データベースの作成
- いくつかのデータで埋めます
- テスト対象のビジネス ロジックを実行して、データを変更します。私はビジネス ロジックの実装や DB スキーマを所有していません。すでにあるものをテストする必要があります。
- データが期待どおりに変更されていることをアサートする
- データベースを削除する
#1 と #5 を削除することで高速化できるように、SQL Server はメモリ内でのみそのようなものをサポートしていますか? 明らかに、私は永続性を必要としません。
performance - Non-Prod DB のサイズが比較的小さい場合、または Prod DB のサイズと異なる場合に、Non-Prod でパフォーマンス テストを行う方法を教えてください。
QA で Jmeter を使用してパフォーマンス テストを行ったところ、QA DB のレコード数は Prod DB のレコード数の 30 ~ 40 分の 1 でした。
上記の理由により、QA でのパフォーマンスは非常に優れていましたが、製品でアプリケーションをリリースしたときのパフォーマンスは非常に悪かったです。
Prod 条件をシミュレートできる Non-Prod でパフォーマンス テストを行うにはどうすればよいですか (ここでは DB サイズに関して)。戦略/プロセスは何ですか?