トップ «前の日記(2006-02-19) 最新 次の日記(2006-02-21)» 編集

活動日誌

2005|02|03|04|05|06|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|03|04|05|06|10|
2008|04|10|

2006-02-20

実行中のテスト名を表示する

テストを [Selected] で実行するときに、どのテストを実行しているのかがはっきりするので便利です。 (なお、TestRunnerはこちら のものを使っています)

--- TestRunner2.html   2006/02/08 01:31:16
+++ TestRunner2.html   2006/02/15 05:51:36
@@ -61,6 +61,7 @@
       <tr class="selenium">
         <th width="20%" height="1" class="header">
           <h1><a href="http://selenium.thoughtworks.com" title="The Selenium Project">Selenium</a> TestRunner</h1>
+          <div id="currentTestName">TestName</div>
         </th>
         <td width="80%" height="30%" rowspan="2"><iframe name="testFrame" id="testFrame"></iframe></td>
       </tr>
--- selenium-testrunner.js  2006/02/07 03:03:42
+++ selenium-testrunner.js  2006/02/15 05:51:36
@@ -93,6 +93,14 @@
     return document.getElementById('testFrame');
 }
 
+function getCurrentTestNameField(){
+    return document.getElementById('currentTestName');
+}
+
+function displayCurrentTestName(name){
+    getCurrentTestNameField().innerHTML = name;
+}
+
 function loadAndRunIfAuto() {
     loadSuiteFrame();
 }
@@ -265,6 +273,8 @@
     }
 
     currentTest = new HtmlTest(getIframeDocument(getTestFrame()));
+
+    displayCurrentTestName(getTestFrame().src.replace(/^.*\//, '').replace(/\.[^.]*$/, ''));
     
     testFailed = false;
     storedVars = new Object();
Tags: Selenium
お名前:
E-mail:
コメント:

トップ «前の日記(2006-02-19) 最新 次の日記(2006-02-21)»
Written by Kouhei Yanagita <yanagi at shakenbu.org>