Megatest

Check-in [c254785656]
Login
Overview
Comment:Merged in edits to docs
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c2547856568573c85a770e811e1c0f088bc6555f
User & Date: matt on 2011-10-08 22:55:37
Other Links: manifest | tags
Context
2011-10-09
00:17
Minor reorganisation in megatest.scm. added placeholder for ezsteps check-in: 37589f80eb user: matt tags: trunk
2011-10-08
22:55
Merged in edits to docs check-in: c254785656 user: matt tags: trunk
21:27
All (I hope) interdependencies captured and testing passes check-in: e0c173490e user: matt tags: trunk
Changes

Modified docs/megatest.lyx from [ae4fa8f5af] to [4948d02234].

816
817
818
819
820
821
822









823
824
825
826
827
828
829
dashboard &
\end_layout

\end_inset


\end_layout










\begin_layout Section
How to Write Tests
\end_layout

\begin_layout Subsection
A Simple Test with one Step







>
>
>
>
>
>
>
>
>







816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
dashboard &
\end_layout

\end_inset


\end_layout

\begin_layout Section
Choose Flow or Unstructured Run?
\end_layout

\begin_layout Standard
A flow is a structured and specifically sequenced set of tests.
 See the Flows chapter to understand the difference.
\end_layout

\begin_layout Section
How to Write Tests
\end_layout

\begin_layout Subsection
A Simple Test with one Step
1519
1520
1521
1522
1523
1524
1525








































































































































1526
1527
1528
1529
1530
1531
1532
\end_layout

\begin_layout Standard
You can optionally specify the keys for your database to limit further the
 runs to extract into the spreadsheet.
 The first sheet contains all the run data and subsequent sheets contain
 data rolled up for the individual tests.








































































































































\end_layout

\begin_layout Section
Reference
\end_layout

\begin_layout Subsection







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
\end_layout

\begin_layout Standard
You can optionally specify the keys for your database to limit further the
 runs to extract into the spreadsheet.
 The first sheet contains all the run data and subsequent sheets contain
 data rolled up for the individual tests.
\end_layout

\begin_layout Section
Flows
\end_layout

\begin_layout Standard
A flow specifies the tests to run, the order and dependencies and is managed
 by a running megatest process.
\end_layout

\begin_layout Section
Flow Specification and Running
\end_layout

\begin_layout Subsection
Write your flow file
\end_layout

\begin_layout Standard
flows/<flowname>.config
\end_layout

\begin_layout Standard
\begin_inset listings
inline false
status open

\begin_layout Plain Layout

# Flow: <flowname>
\end_layout

\begin_layout Plain Layout

[flowconfig]
\end_layout

\begin_layout Plain Layout

# turn on item level dependencies
\end_layout

\begin_layout Plain Layout

itemdeps on
\end_layout

\begin_layout Plain Layout

\end_layout

\begin_layout Plain Layout

[flowsteps]
\end_layout

\begin_layout Plain Layout

# <testname>[,<predecessor>]
\end_layout

\begin_layout Plain Layout

\end_layout

\begin_layout Plain Layout

# Run the test "copydata"
\end_layout

\begin_layout Plain Layout

copydata
\end_layout

\begin_layout Plain Layout

\end_layout

\begin_layout Plain Layout

# Run the test "setup" after copydata completes with PASS, WARN or WAIVE
\end_layout

\begin_layout Plain Layout

setup,copydata
\end_layout

\begin_layout Plain Layout

\end_layout

\begin_layout Plain Layout

# once the test "setup" completes successfully run sim1, sim2 and sim3
\end_layout

\begin_layout Plain Layout

sim1,setup
\end_layout

\begin_layout Plain Layout

sim2,setup
\end_layout

\begin_layout Plain Layout

sim3,setup
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Run the flow
\end_layout

\begin_layout Standard
\begin_inset listings
inline false
status open

\begin_layout Plain Layout

megatest -runflow <flowname> :FIELD1 val1 :FIELD2 val2 :runname wk32.4
\end_layout

\end_inset


\end_layout

\begin_layout Section
Reference
\end_layout

\begin_layout Subsection

Added run_records.scm version [572c26cb20].



























>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
(define-inline (test:get-id vec)       (vector-ref vec 0))
(define-inline (test:get-run_id vec)   (vector-ref vec 1))
(define-inline (test:get-test-name vec)(vector-ref vec 2))
(define-inline (test:get-state vec)    (vector-ref vec 3))
(define-inline (test:get-status vec)   (vector-ref vec 4))
(define-inline (test:get-item-path vec)(vector-ref vec 5))

(define-inline (test:test-get-fullname test)
   (conc (db:test-get-testname test)
	 (if (equal? (db:test-get-item-path test) "")
	     ""
	     (conc "(" (db:test-get-item-path test) ")"))))

Added tests/vectors-vs-records.scm version [e4ff5d5a7e].











































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(use srfi-9)

(define numtodo (string->number (caddr (argv))))

;; using vectors
(define testvalvec (vector 0 1 2 3 4 5))
(define-inline (testing:get-first  vec    )(vector-ref  vec 0))
(define-inline (testing:get-count  vec    )(vector-ref  vec 5))
(define-inline (testing:set-first! vec val)(vector-set! vec 0 val))
(define-inline (testing:set-count! vec val)(vector-set! vec 5 val))

(if (equal? (cadr (argv)) "vectors")
    (begin
      (print "Testing " numtodo " vectors")
      (let loop ((i 0))	
        (testing:set-count! testvalvec i)
        (testing:set-first! testvalvec (testing:get-count testvalvec))
        (if (< i numtodo)
            (loop (+ i 1))))))

;; using records
(define-record-type  testing
  (make-testing zeroeth first second third fourth count)
  testing?
  (count get:count set:count)
  (first get:first set:first))

(define testvalrec (make-testing 0 1 2 3 4 5))

(if (equal? (cadr (argv)) "records")
    (begin
      (print "Testing " numtodo " records")
      (let loop ((i 0))
         (set:count testvalrec i)
         (set:first testvalrec (get:count testvalrec))
         (if (< i numtodo)
             (loop (+ i 1))))))