Refactor Processor Integration Tests #406

merged 7 commits into from May 12, 2013


None yet

2 participants


The existing integration tests for 'processors' share a common set of test cases, but since this is not enforced there are processors that are missing tests. This code is an attempt to resolve this by creating base test classes, similar to the generator unit test base classes, refactoring existing test code and adding extra test where necessary.


Whilst these changes do affect all the existing processors, the main focus of this work is to improve the following processors:

  • Firebird
  • Oracle
  • Postgres
  • SqlServer
  • SqlServerCe

The reason for not including Jet, MySql and SQLite was that there was so little integration test coverage for tables, columns, etc. The hope is that this code will help others in the future improve the test coverage of those processors.


It is worth noting that these changes have been tested with each RDMS and I have not found that any of these test fail. Please let me know if the integration tests no longer passing for you.

Matthew Dunsdon added some commits Mar 26, 2013
Matthew Dunsdon Add base classes for processor integration tests
There is no consistant definition of what tests should be covered in
processors.  Base classes for tests have been created to resolve this.

Assumptions have been made in regards to test classification.

 1. Some SQL RDMS do not have support for schemas or sequences
 2. Some SQL RDMS that support schemas, such as Oracle Database, present a
 challenge to test multiple schemas.
  * For Oracle Database, a schema is tied to the user defined in the
  connection string.
 3. Some existing tests appeared too specific and do not need a base class
Matthew Dunsdon Move processor tests into individual folders
Kept this commit seperate to help those who may want to rebase their work
over my changes.
Matthew Dunsdon Organise SQL Server integration tests
 1. Test table did not correctly quote table names
 2. Test table only supported one column - incorrect brackets
 3. No existing test coverage regarding schemas, constraints or indexes
Matthew Dunsdon Organise SQL Server CE integration tests
Test table did not allow custom index or constraint names. This is useful
for testing single quotes in index and constriant names.
Matthew Dunsdon Organise Postgres integration tests
Test table constuctor did not match existing pattern
 * "(table, processor / connection, schema, columns)"
Matthew Dunsdon Organise Oracle integration tests
 1. Found bug in processor code - object names were not been escaped
 2. Test table constructor changed to match pattern (see previous commit)
Matthew Dunsdon Organise Firebird integration tests
Test table constructor changes to match pattern (see previous commits)

Oh wow. Thanks for doing this. It's not often we get a pull request for refactoring tests. 🌟

I'll try and get this in as soon as possible.


Lovely PR. Thank you so much for all this hard work!

@daniellee daniellee merged commit fb2c7c8 into schambers:master May 12, 2013

1 check passed

Details default The Travis build passed
@matthewdunsdon matthewdunsdon deleted the matthewdunsdon:RefactorProcessorTests branch May 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment