07 Dec 2016 16:33:32 UTC
- Distribution: Test-DBIx-Class
- Module version: 0.52
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (6)
- Testers (3369 / 3 / 0)
- KwaliteeBus factor: 2
- 83.15% Coverage
- License: perl_5
- Activity24 month
- Download (395.52KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:2 non-PAUSE usersNEWELLC Colin Newelland 1 contributors
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Test::DBIx::Class::SchemaManager - Manages a DBIx::Class::SchemaManager for Testing
this class is a helper for Test::DBIx::Class. Basically it is a type of wrapper or adaptor for your schema so we can more easily and quickly deploy it and cleanup it for the purposes of automated testing.
You shouldn't need to use anything here. However, we do define %ENV variables that you might be interested in using (although its probably best to define inline configuration or use a configuration file).
Set to a true value will force dropping tables in the deploy phase. This will generate warnings in a database (like sqlite) that can't detect if a table exists before attempting to drop it. Safe for Mysql though.
Usually at the end of tests we cleanup your database and remove all the tables created, etc. Sometimes you might want to preserve the database after testing so that you can 'poke around'. Personally I think it's better to write tests for the poking, but sometimes you just need a quick look.
Please Note that KEEP_DB is not intended for use as a way to preserve deployed databases across tests or test runs. I realize you may wish to try this as a way to reduce testing time, since starting and deploying databases can be time consuming, however it negates the goal we have to properly isolate the test cases.
If there is tremendous need for this type of feature, we may in the future try to develop a good working system. For now I recomment using the
reset_schema(see "reset_schema" in Test::DBIx::Class for more) and subtests if you want to try this for a given test run..
The following modules or resources may be of interest.
Copyright 2009, John Napiorkowski
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Test::DBIx::Class, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Test::DBIx::Class
For more information on module installation, please visit the detailed CPAN module installation guide.