Skip to content

Latest commit

 

History

History

megatest

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
Megatest is a suite of bash scripts that causes rails_apps_composer to generate
some (ideally, all) of the RailsApps example applications. After generating
these applications, megatest runs their tests.

Megatest can be used for regression testing for rails_apps_composer. If you've made
a change to rails_apps_composer, you may not see unintended effects until you've
run a test suite for each of the RailsApps example applications.

Megatest runs on Linux, Mac OS X, and NetBSD. See a separate README for NetBSD.

How to run the megatest:

Be in the right directory:
$ cd rails_apps_composer

For increased portability, the following commands don't use the syntax,
"export name=value". Instead, they use two commands for the same effect. BTW,
"rac" stands for "rails_apps_composer".

Before running their tests, some RailsApps example applications require various
API keys. You can provide these API keys by setting certain Unix environment
variables in your shell:

$                rac_test_RECURLY_API_KEY=Change_this_to_your_key
$ export         rac_test_RECURLY_API_KEY

$         rac_test_RECURLY_JS_PRIVATE_KEY=Change_this_to_your_key
$ export  rac_test_RECURLY_JS_PRIVATE_KEY

$                 rac_test_STRIPE_API_KEY=Change_this_to_your_key
$ export          rac_test_STRIPE_API_KEY

$              rac_test_STRIPE_PUBLIC_KEY=Change_this_to_your_key
$ export       rac_test_STRIPE_PUBLIC_KEY

Run the megatest:

$ bundle exec rake megatest

Megatest will generate a file one level above the current directory:
$ ls -ld ../repo-list

Megatest will generate a folder one level above the current directory:
$ ls ../generated

The *generated/* folder will contain the example applications generated by the
megatest scripts.

Any test suite failures will appear in your console window.

Alternatively, you can change your directory to any of the generated example
applications and run a test suite with:

$ cd ../generated/{some-app}
$ rake test
$ rake spec
$ cucumber

You can clone an example application from the GitHub repo and potentially use a
file compare utility to see the differences between the generated project and
the original.