[Appsunit-develop] [cvscommit] web/htdocs/testguide AppsUnit Test Guide.html, 1.8, 1.9
Status: Beta
Brought to you by:
jancumps
|
From: Jan C. <jan...@us...> - 2006-11-13 17:45:29
|
Update of /cvsroot/appsunit/web/htdocs/testguide In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv18325/testguide Modified Files: AppsUnit Test Guide.html Log Message: Restyle to reflect (some kind of) house style. Index: AppsUnit Test Guide.html =================================================================== RCS file: /cvsroot/appsunit/web/htdocs/testguide/AppsUnit Test Guide.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AppsUnit Test Guide.html 12 Nov 2006 21:07:43 -0000 1.8 --- AppsUnit Test Guide.html 12 Nov 2006 22:00:32 -0000 1.9 *************** *** 4,11 **** <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> ! <title>AppsUnit Test Guide</title> ! <link rel="stylesheet" href="../stylesheet.css" type="text/css"> </head> --- 4,11 ---- <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> ! <title>Apps Unit</title> ! <link rel="stylesheet" href="stylesheet.css" type="text/css"> </head> *************** *** 16,20 **** <br> ! <table style="background-color: rgb(255, 255, 255); width: 100%; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="0"> <tbody> --- 16,20 ---- <br> ! <table class="normal" style="background-color: rgb(255, 255, 255); width: 100%; text-align: left; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="0"> <tbody> *************** *** 37,41 **** <br> ! <table style="background-color: rgb(255, 255, 255); width: 100%; text-align: center; margin-left: 0px; margin-right: auto;" border="1" cellpadding="2" cellspacing="0"> <tbody> --- 37,41 ---- <br> ! <table style="text-align: left; background-color: rgb(255, 255, 255);" border="1" cellpadding="2" cellspacing="0"> <tbody> *************** *** 43,68 **** <tr> ! <td> ! <table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="0"> ! <tbody> ! <tr> ! <td class="H1"> ! <p align="center">Test Guide</p> ! </td> ! <td align="right" valign="undefined"><a href="/index.html"><img style="border: 0px solid ; width: 30px; height: 30px;" alt="home" title="home" src="../images/greyscale_17.gif"></a></td> ! </tr> ! </tbody> ! </table> ! </td> </tr> --- 43,83 ---- <tr> ! <td> <span class="H1">Foreword</span> <br> ! <span class="normal"><br> ! Although automation of ! functional test for ERP software ! is ! becoming common practice, unit testing and test driven development ! is less popular.</span><br> ! <span class="normal">This project wants to promote ! unit testing, and ! test driven development, in the ERP community. We will do this by</span> ! <ul class="normal"> ! <li> showing that it can be done, </li> ! <li> providing usefull tools to facilitate testing. </li> ! </ul> ! <span class="normal">There's no need to install ! anything on the Apps instances.<br> ! </span> ! <p><span class="normal">The <a href="testguide/AppsUnit%20Test%20Guide.html">Test Guide</a> ! helps you validating your code.<br> + Please refer to the <a href="http://sourceforge.net/projects/appsunit">project home + on SourceForge.net</a> for more info.</span></p> ! <span class="normal">This is an open source project, ! independent from Oracle Corporation.</span><br class="normal"> ! ! <span class="normal">"Oracle, JD Edwards, ! PeopleSoft, and Siebel are registered trademarks ! of Oracle Corporation and/or its affiliates."</span></td> </tr> *************** *** 73,77 **** <br> ! <table style="text-align: left; background-color: rgb(255, 255, 255); width: 100%;" border="1" cellpadding="0" cellspacing="1"> <tbody> --- 88,92 ---- <br> ! <table style="text-align: left; background-color: rgb(255, 255, 255); width: 100%;" border="1" cellpadding="2" cellspacing="0"> <tbody> *************** *** 79,277 **** <tr> ! <td class="normal normal"><span class="H1">Testing ! views</span> ! <p class="normal">When creating database views, the ! most common failures are ! missing ! or duplicate records, and wrong data values.</p> ! ! <p class="normal">A wrong record count is mostly ! caused by incorrect joins. If ! you ! forget to define an outer join, your view will miss records. If you ! don't use the propper join conditions, you might get duplicate ! records. If you forget the join conditions for one of the tables, ! you'll get a lot of wrong records.</p> ! ! <p class="normal">You can avoid these mismatches by ! asserting that your view ! contains the correct number of records.<br> ! ! Most of the time there is ! one table in the view that is the driving table. It's the core table ! of the view. Compare the record count of that table with the record ! count of your view.</p> ! ! <p class="normal">When creating a view for order ! lines with additional item and ! customer info, the driver could be oe_order_lines_all. It's the ! number of order lines in the system that should decide how many rows ! your view returns, not the number of items or customers you have. ! Your view should return exactly the same record count as table ! oe_order_headers_all.</p> ! ! <p class="normal"></p> ! ! <table style="background-color: rgb(255, 255, 204); width: 706px; height: 125px;" border="1" bordercolor="#000000" cellpadding="4" cellspacing="0"> ! ! <col width="256*"> <thead> <tr> ! ! <td style="width: 100%; vertical-align: top;"> ! <p class="normal"><u>How to test for ! missing or extra records in a ! view?</u></p> ! ! <p class="normal">Find the table that is the ! core of your view (the driving ! table).<br> ! ! Assert that the record count of the driving table matches the record ! count of your view.</p> ! ! <p class="code"><font face="Courier New, monospace">simpleCompare( ! “select count(*) from oe_order_lines_all”,<br> ! ! “select count(*) from xx_order_lines_view”);</font></p> ! ! </td> ! ! </tr> ! ! </thead> ! </table> ! ! <p class="normal">You can create this test at the ! very begin of your view design ! phase. Then start by creating your basic view:</p> ! ! <p class="code"><font face="Courier New, monospace">create ! view ! xx_order_lines_view as <br> ! ! select<br> ! ! line_id <br> ! ! from<br> ! ! oe_order_lines_all<br> ! ! with read only;</font></p> ! ! <p class="normal">The tests will pass. You can now ! safely add extra fields and ! tables to the view. Run the tests again. If you forget an outer join, ! or create a cardinal join, your tests will fail.</p> ! ! <p class="normal">Validating the correctness of a ! field value in your view is ! straightforward. You write a quey that asserts wether your view ! returns the value you expect.</p> ! ! <p class="normal">If you want to validate the value ! for the customer, you could ! locate an example order line in your application and write down the ! customer name (the expectation). Then write a query to verify that ! your view returns this customer.</p> ! ! <p class="code"><font face="Courier New, monospace">select ! count(*) from ! xx_order_lines_view where<br> ! ! line_id = 25845<br> ! ! and customer_name ! = 'SOURCEFORGE';</font></p> ! ! <p></p> ! ! <table style="background-color: rgb(255, 255, 204); width: 100%;" border="1" bordercolor="#000000" cellpadding="4" cellspacing="0"> ! ! <col width="256*"> <thead> <tr> ! ! <td style="width: 100%; vertical-align: top;"> ! <p class="normal"><u>How to test for ! correct field values in a view?</u></p> ! ! <p class="normal">Locate an example that has a ! known value for the field.<br> ! ! Assert that the view returns this expected value.</p> ! ! <p class="code"><font face="Courier New, monospace">simpleCompare( ! “select 1 from dual”,<br> ! ! “select count(*) from xx_order_lines_view where line_id = ! 23548<br> ! ! and item_description = 'Feature Request'”);</font></p> ! ! </td> ! ! </tr> ! ! </thead> ! </table> ! ! <p class="normal">Add regression tests during the ! lifecycle of your view. ! Whenever ! you find a wrong value in your view, or when someone raises a bug ! against your view, create a test that fails for the given error.</p> ! ! <p class="normal" style="font-style: normal;">If ! the error report says ! that your view ! reports that the order line was not closed, but the application shows ! that it's closed, you can create a regression test:</p> ! ! <p class="code" style="font-style: normal;"><font face="Courier New, monospace">select ! count(*) from xx_order_lines_view where<br> ! ! line_id = 12487 <br> ! ! and ! closed_status = 'Y';</font></p> ! ! <p class="normal">The test will pass when your bug ! is resolved. And because you ! add ! this test to the test suite, this bug will never have a chance of ! showing up again.</p> ! ! <p></p> ! ! <table style="background-color: rgb(255, 255, 204); width: 100%;" border="1" bordercolor="#000000" cellpadding="4" cellspacing="0"> ! ! <col width="256*"> <thead> <tr> ! ! <td style="width: 100%; vertical-align: top;"> ! <p class="normal"><u>How to avoid ! regression?</u></p> ! ! <p class="normal">Create a regression test for ! each bug or error reported ! for your view.<br> ! ! Add the test to your test suite.</p> ! ! <p class="code"><font face="Courier New, monospace">simpleCompare( ! “select 0 from dual”,<br> ! ! “select count(*) from xx_order_lines_view where line_id = ! 48574<br> ! ! and payment_date < order_date”);</font></p> ! </td> ! </tr> ! </thead> ! </table> <br> ! </td> </tr> --- 94,111 ---- <tr> ! <td><span class="H2">Fast Start</span><br> ! <br> ! <span class="normal">You can start running your own ! testsuite by </span><a class="normal" href="http://sourceforge.net/project/showfiles.php?group_id=176804&package_id=203456&release_id=449807"> ! downloading the example project</a><span class="normal">, ! named </span><i class="normal">Archetype</i><span class="normal">.<br> ! The example project tests some core apps views, an creates a </span><a class="normal" href="example/junit.pdf">pdf report</a><span class="normal"> from the results.<br> <br> ! </span><img style="border: 0px solid ; width: 725px; height: 398px;" alt="Example PDF Report" class="normal" src="images/junit.jpg"> </td> </tr> *************** *** 288,367 **** <tr> ! <td class="normal"> ! <p class="H2">Testing functions</p> ! ! <p class="normal">The smartest way to test a ! database function is to write a ! query ! that validates if the function returns expected results.</p> ! ! <p class="normal">If you have a function that ! converts amounts from one currency ! to ! another, you can assert this as follows:</p> ! ! <p class="code" style="font-style: normal;"><font face="Courier New, monospace">select ! count(*) from dual where<br> ! ! xx_currency_spot_convert(<br> ! ! 1200, 'USD', 'EUR', '01-JAN-2001') = 1193;</font></p> ! ! <p class="normal">The test will pass when the ! function returns the correct value ! for these parameters.</p> ! ! <p></p> ! ! <table style="background-color: rgb(255, 255, 204); width: 100%;" border="1" bordercolor="#000000" cellpadding="4" cellspacing="0"> ! ! <col width="256*"> <thead> <tr> ! ! <td style="width: 100%; vertical-align: top;"> ! <p class="normal"><u>How to test a stored ! function?</u></p> ! ! <p class="normal">Locate an example that has a ! known return value for a ! given set of parameters.<br> ! ! Assert that the function returns this expected value.</p> ! ! <p class="code"><font face="Courier New, monospace">simpleCompare( ! “select 1 from dual”,<br> ! ! “select count(*) from dual where <br> ! ! <span style="font-style: normal;">xx_currency_spot_convert(<br> ! ! 821.256, 'USD', 'USD', '19-JAN-2003') = 821.256</span>”)</font></p> ! ! </td> ! ! </tr> ! ! </thead> ! </table> ! ! <br> ! ! </td> ! ! </tr> ! ! </tbody> ! </table> ! ! <br> ! ! <table style="text-align: left; background-color: rgb(255, 255, 255); width: 100%;" border="1" cellpadding="2" cellspacing="0"> ! <tbody> ! <tr> ! <td><span class="H1">Testing concurrent ! requests</span> ! <p class="normal">To be written</p> </td> --- 122,140 ---- <tr> ! <td> ! <div class="H1">Specification. </div> ! <p class="H2">Requirements </p> ! <span class="normal">The toolkit will provide ! the means to ! test Oracle e-business suite development. We will focuss on backend ! objects: views, packages and concurrent requests. </span><br class="normal"> ! <span class="normal">Utility objects will help ! to connect to ! the backend and create an environment as if your code was running ! from within the ERP.</span> ! <p style="margin-bottom: 0cm;"><img style="width: 281px; height: 361px;" alt="Analysis Model" src="images/AnalysisModel.jpg"></p> </td> *************** *** 374,378 **** <br> ! <table style="text-align: left; background-color: rgb(255, 255, 255); width: 100%;" border="1" cellpadding="2" cellspacing="0"> <tbody> --- 147,151 ---- <br> ! <table class="normal" style="text-align: left; background-color: rgb(255, 255, 255); width: 100%;" border="1" cellpadding="2" cellspacing="0"> <tbody> *************** *** 407,410 **** --- 180,187 ---- </table> + <br> + + <div style="font-family: Helvetica,Arial,sans-serif;" class="normal"><font size="-2">thank you <a href="http://e-lusion.com/design/greyscale/">http://e-lusion.com/design/greyscale/</a></font></div> + </body> </html> |