Giter Club home page Giter Club logo

uktm_regression_tests's Introduction

UKTM_regression_test: Regression testing UK TIMES dd files generated using Veda FE

This Ruby script allows you to compare 2 directories' worth of DD (text) files. It uploads each file to a temporary table on a postgres database and then compares the entries in each of these tables. The match is on input DD filename and the contents of the line entry from that file: in effect it assumes there are no duplicate lines within a DD. Outputs are CSVs of summary counts / percentages of file entries the same / different by input file, and a separate file containing those differences together with the line number of the file from which they came.

Run the script using the following syntax:

ruby <"full path to script"> <"full path to first folder of dds"> <"full path to second folder of dds"> ["optional full path to where output CSVs should go"]

Output CSVs go to the second folder of dds if no other location is specified.

Input folder names are used as column headings in some of the database temporary tables. There is some replacement of characters which are illegal in unquoted Postgres field names (i.e. changes "." and "-" to underscores). However, there is no checking of or dealing with spaces in folder names so don't include any!

15-8-2017: The script has been updated to split out and compare the numerical values in DD files. The comparison is based on equivalence to 5 decimal places. Note that entries without numbers are given the value 0 in the entry_val column: this is just so that other numerical comparisons can go ahead. So you can ignore this if the original entry is not numeric.

Note that requires Ruby gem 'pg', the Postgres driver for Ruby. There is some code to try to install this if it's missing, but this may not work if you have more than one Ruby installation on the machine. (In which case install by hand.)

NB Is compatible with pg 0.20.0. May not work with latest. Can install a particular version using this syntax: gem install pg -v 0.20.0

uktm_regression_tests's People

Contributors

fsymons avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

uk-gov-mirror

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.