5 This module no longer needs to be installed. Run it directly from the source
10 "freeside-test-run" is the main test script. Currently there's only one test
11 plan, "ui_tests". freeside-test-run will:
13 - download all the URLs listed in the test plan into a directory in /tmp
14 - compare them to the reference versions with "diff -ur"
15 - write the output to "freeside_test.YYYYMMDD.diff"
17 The raw output directory will not be deleted, so you can examine the results
20 If you want to do anything with the database besides compare the test results
21 to reference, run "freeside-test-start" by hand first. This will create a
22 database with the test image and start Apache with a fake time of one day after
23 the last bill. If there's an existing Freeside database, it will be renamed to
24 "freeside_YYYYMMDD" (the current date).
26 To put the existing database back in place, run "freeside-test-stop", then
27 restart Apache and any Freeside services.
29 UPDATING THE REFERENCE PAGES
31 The simplest way to update the reference copies of the test pages is
33 bin/freeside-test-start
34 bin/freeside-test-fetch -d ./share/output
36 (from the FS-Test source directory). If you're installing from a git repo,
37 this will overwrite the working tree with the newly downloaded test pages.
38 You can then use "git diff" to examine your changes and "git commit" to
39 commit them when you're done.
43 For UI tests, add the URL, minus the "http://hostname/freeside" prefix,
44 to share/ui_tests. Then run freeside-test-fetch to get the reference output
45 of the test and copy it to share/output (and add that file to git).
47 When adding any new test, make sure to _run it twice_ on the same database
48 and code version to detect random or time-sensitive variations. These will
49 throw false alerts when anyone else uses your test, so you'll need to suppress
52 WHAT'S IN THE TEST DATABASE
54 Two hundred customers with random nonsensical U.S. addresses. One third have
55 automatic checking, the rest have credit cards. 10% of the customers have
56 separate billing and service addresses.
58 Four package definitions (plus the unique "system domain"): annual domain,
59 monthly prorated account, monthly prorated broadband service, monthly
60 phone. Each package has one service except the phone package, which has a
61 quantity limit of 4. The two monthly prorated packages have setup fees.
63 Each customer has three of the four packages, started over the period from
64 2015-08-01 to 2016-03-01. Each package has a service configured (with a random
65 username, domain name, phone number, or IP address). Customers were invoiced
66 on the first day of each month during that period.
68 There's a billing event to run automatic credit card billing on eligible
69 invoices. The configured gateway is Business::OnlinePayment::Dummy, which
70 returns success for everything, so customers with credit cards will be fully
73 One user with unlimited access. Username "test", password "test".
75 There are no cancellations or suspensions, no credits, no taxes, no refunds,
76 no discounts, no exports, and no RT tickets. All of this stuff lies in the
77 bright shining future.
79 If you modify the test database, be sure to update this section also. Also
80 update the company name to "Freeside Test X.Y.Z" where X.Y is the Freeside
81 version number and Z is the test database version number, and set the same
82 value in freeside-test-start so that old test databases aren't used by