Test Musterbogen
Aus BogenWiki
(Unterschied zwischen Versionen)
Nugman (Diskussion | Beiträge) |
Nugman (Diskussion | Beiträge) |
||
(Der Versionsvergleich bezieht 59 dazwischenliegende Versionen mit ein.) | |||
Zeile 1: | Zeile 1: | ||
- | + | <html> | |
- | + | <table id="Frame" style="background:silver" width=100% cellspacing=0 cellpadding=4> | |
- | + | <tr style="background:white" valign=top> | |
- | + | <td id="Frame.Top" width=100%> | |
- | + | <table style="background:silver;" width=100% cellspacing=1 cellpadding=4> | |
- | + | <tr style="background:#E0E0E0;" valign=top> | |
- | + | <td style="padding:2px 6px 1px 6px"><b>Tests</b></td> | |
- | + | </tr> | |
- | + | <tr style="background:#F8F8F8;" valign=top> | |
- | + | <td> | |
- | {{ | + | <table style="background:transparent;" cellspacing=1 cellpadding=4> |
- | + | <tr valign=center> | |
- | + | <td> | |
- | + | Testcases: | |
- | + | </td> | |
- | + | <td> | |
- | + | <select id="BGF.MB.Tests" name="Tests"> | |
- | + | <option value="BGF_Number.ctor">BGF_Number.ctor</option> | |
- | + | <option value="BGF_Number.GetValueAs">BGF_Number.GetValueAs()</option> | |
- | + | <option value="BGF_Number.ConvertTo">BGF_Number.ConvertTo()</option> | |
- | + | </select> | |
- | + | </td> | |
- | + | <td> | |
- | + | </html> {{Button|Caption=Run |ID=BGF.MB.RunTest |OnEvent=BtnPageEvent}}<html> | |
- | + | </td> | |
- | + | </tr> | |
- | { | + | </table> |
- | + | </td> | |
- | + | </tr> | |
- | { | + | </table> |
- | + | </td> | |
- | + | </tr> | |
- | + | <tr style="background:white" valign=top> | |
- | + | <td id="Frame.Bottom" width=100% valign=top> | |
+ | <table style="background:silver;" width=100% cellspacing=1 cellpadding=4> | ||
+ | <tr style="background:#E0E0E0;" valign=top> | ||
+ | <td style="padding:2px 6px 1px 6px"><b>Output</b></td> | ||
+ | </tr> | ||
+ | <tr style="background:#F8F8F8;" valign=top> | ||
+ | <td> | ||
+ | <div id="BGF.MB.Output" style="width:100%;overflow:auto;height:75vh;"></div> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | <template id="BGF.MB.Test.Output.Template"> | ||
+ | <template id="Head"></template> | ||
+ | <div id="BGF.MB.Test.%%BGFType%%.%%Method%%.%%Name%%.Create.div" style="width:100%;border:0px solid silver;margin:6px 0px 12px 4px;"> | ||
+ | <table style="background:silver;" cellspacing=1 cellpadding=4> | ||
+ | <tr style="background:#E0E0E0;" valign=top> | ||
+ | <td style="padding:2px 6px 1px 6px">Test: <b>%%TCTitle%%</b> (%%BGFType%%.%%Method%%.%%Name%%)</td> | ||
+ | </tr> | ||
+ | <tr style="background:#F8F8F8;" valign=top> | ||
+ | <td> | ||
+ | <table style="background:silver;" width=100% cellspacing=1 cellpadding=4> | ||
+ | <template id="TabHead"></template> | ||
+ | <tr style="background:#E0E0E0;" valign=top> | ||
+ | <td style="padding:2px 6px 1px 6px"><b>Code</b></td> | ||
+ | <td style="padding:2px 6px 1px 6px"><b>Variables</b></td> | ||
+ | <td style="padding:2px 6px 1px 6px"><b>Result</b></td> | ||
+ | </tr> | ||
+ | <template id="Body"></template> | ||
+ | <tr style="background:#F8F8F8;" valign=top> | ||
+ | <td style="padding:2px 6px 1px 6px"><tt>%%Code%%</tt></td> | ||
+ | <td style="padding:2px 6px 1px 6px">%%Variables%%</td> | ||
+ | <td style="padding:2px 6px 1px 6px">%%Result%%</td> | ||
+ | </tr> | ||
+ | <template id="ResOK"><span style="color:green"><b>OK</b></span></template> | ||
+ | <template id="ResKO"><span style="color:red"><b>failed</b></span></template> | ||
+ | <template id="HashBegin">{</template> | ||
+ | <template id="HashNext">, </template> | ||
+ | <template id="HashEnd">}</template> | ||
+ | <template id="ValueOK">%%VarName%%: %%Value%%</template> | ||
+ | <template id="ValueKO">%%VarName%%: <span style="color:red">%%Value%%</span> <span style="color:green">(%%ValueExp%%)</span></template> | ||
+ | <template id="ValueKO1"><span style="color:red">%%Value%%</span></template> | ||
+ | <template id="Foot"></template> | ||
+ | </table> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </div> | ||
+ | </template> | ||
+ | <script src="/bogenwiki_bgf/src/bgf_libaux.js"></script> | ||
+ | <script src="/bogenwiki_bgf/src/bgf_libdebug.js"></script> | ||
+ | <script src="/bogenwiki_bgf/src/bgf_libgui.js"></script> | ||
+ | <script src="/bogenwiki_bgf/src/bgf_mbtypes.js"></script> | ||
+ | <script src="/bogenwiki_bgf/src/bgf_mbtests.js"></script> | ||
+ | <script> | ||
+ | function MGF_MB_OnClick(eElement) | ||
+ | { | ||
+ | console.log('[MGF_MB_OnClick] eElement.id='+eElement.id); | ||
+ | var sElementID = eElement.id; | ||
+ | switch (sElementID) { | ||
+ | case 'BGF.MB.RunTest': | ||
+ | var sSelectedTest = document.getElementById('BGF.MB.Tests').value; | ||
+ | console.log('sSelectedTest = '+sSelectedTest); | ||
+ | var [sClass,sMethod] = sSelectedTest.split('.'); | ||
+ | ExecTests(sClass,sMethod); | ||
+ | break; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | sActiveBgColor = '#A0A0A0'; | ||
+ | sActiveCaColor = 'white'; | ||
+ | sInactiveBgColor = '#E0E0E0'; | ||
+ | sInactiveCaColor = 'black'; | ||
+ | sHoverBgColor = '#D0D0D0'; | ||
+ | sHoverCaColor = 'black'; | ||
+ | function BtnPageEvent(sID,sEvent) { | ||
+ | eButton = document.getElementById(sID); | ||
+ | switch (sEvent) { | ||
+ | case 'onmouseenter': | ||
+ | //console.log(sID,aActiveBtnID[0],aActiveBtnID[1]); | ||
+ | eButton.style.background=sHoverBgColor; | ||
+ | eButton.style.color=sHoverCaColor; | ||
+ | break; | ||
+ | case 'onmouseleave': | ||
+ | eButton.style.background=sInactiveBgColor; | ||
+ | eButton.style.color=sInactiveCaColor; | ||
+ | break; | ||
+ | case 'onclick': | ||
+ | MGF_MB_OnClick(eButton); | ||
+ | break; | ||
+ | case 'onload': | ||
+ | eButton.style.background=sInactiveBgColor; | ||
+ | eButton.style.color=sInactiveCaColor; | ||
+ | break; | ||
+ | } | ||
+ | } | ||
+ | </script> | ||
+ | </html> |
Aktuelle Version vom 07:36, 3. Jul. 2024
|
|||||
|
Test: %%TCTitle%% (%%BGFType%%.%%Method%%.%%Name%%) | ||||||
|