use of jp.ossc.nimbus.service.test.TestScenarioGroup in project nimbus by nimbus-org.
the class ConsoleTestEstimateReporterService method report.
public void report(TestController controller) {
try {
TestScenarioGroup[] groups = controller.getScenarioGroups();
for (int index = 0; index < groups.length; index++) {
String scenarioGroupId = groups[index].getScenarioGroupId();
TestScenarioGroup testScenarioGroup = controller.getScenarioGroup(scenarioGroupId);
TestScenario[] testScenarios = controller.getScenarios(scenarioGroupId);
TestScenarioGroup.TestScenarioGroupResource testScenarioGroupResource = testScenarioGroup.getTestScenarioGroupResource();
if (testScenarioGroupResource == null) {
continue;
}
System.out.println(scenarioGroupId + ":" + new BigDecimal(testScenarioGroupResource.getExpectedCost() / rate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
for (int index2 = 0; index2 < testScenarios.length; index2++) {
TestScenario testScenario = testScenarios[index2];
TestScenario.TestScenarioResource testScenarioResource = testScenario.getTestScenarioResource();
if (testScenarioResource == null) {
continue;
}
System.out.println(" " + testScenario.getScenarioId() + ":" + new BigDecimal(testScenarioResource.getExpectedCost() / rate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}
}
} catch (Exception e) {
ServiceManagerFactory.getLogger().write("CTR__00001", e);
return;
}
}
use of jp.ossc.nimbus.service.test.TestScenarioGroup in project nimbus by nimbus-org.
the class HtmlTestCaseProgressReporterService method report.
public void report(TestController controller) {
PrintWriter pw = null;
try {
TestScenarioGroup[] groups = controller.getScenarioGroups();
pw = new PrintWriter(new BufferedWriter(new FileWriter(new File(outputPath, "index.html"))));
pw.println("<html>");
pw.println("<head><title>TestCase Create Progress</title></head>");
pw.println("<body>");
pw.println("<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\" width=\"100%\">");
pw.println("<tr bgcolor=\"#cccccc\">");
pw.println("<th colspan=\"8\" scope=\"colgroup\">ScenarioGroup</th>");
pw.println("<th colspan=\"8\" scope=\"colgroup\">Scenario</th>");
pw.println("<th colspan=\"8\" scope=\"colgroup\">TestCase</th>");
pw.println("</tr>");
pw.println("<tr bgcolor=\"#cccccc\">");
pw.println("<th scope=\"col\">ID</th>");
pw.println("<th scope=\"col\">説明</th>");
pw.println("<th scope=\"col\">作成担当者</th>");
pw.println("<th scope=\"col\">開始予定日</th>");
pw.println("<th scope=\"col\">開始日</th>");
pw.println("<th scope=\"col\">終了予定日</th>");
pw.println("<th scope=\"col\">終了日</th>");
pw.println("<th scope=\"col\">進捗</th>");
pw.println("<th scope=\"col\">ID</th>");
pw.println("<th scope=\"col\">説明</th>");
pw.println("<th scope=\"col\">作成担当者</th>");
pw.println("<th scope=\"col\">開始予定日</th>");
pw.println("<th scope=\"col\">開始日</th>");
pw.println("<th scope=\"col\">終了予定日</th>");
pw.println("<th scope=\"col\">終了日</th>");
pw.println("<th scope=\"col\">進捗</th>");
pw.println("<th scope=\"col\">ID</th>");
pw.println("<th scope=\"col\">説明</th>");
pw.println("<th scope=\"col\">作成担当者</th>");
pw.println("<th scope=\"col\">開始予定日</th>");
pw.println("<th scope=\"col\">開始日</th>");
pw.println("<th scope=\"col\">終了予定日</th>");
pw.println("<th scope=\"col\">終了日</th>");
pw.println("<th scope=\"col\">進捗</th>");
pw.println("</tr>");
for (int index = 0; index < groups.length; index++) {
TestScenarioGroup.TestScenarioGroupResource resource = groups[index].getTestScenarioGroupResource();
if (resource != null) {
reportScenarioGroup(pw, controller, groups[index]);
}
}
pw.println("</body>");
pw.println("</html>");
pw.flush();
} catch (Exception e) {
ServiceManagerFactory.getLogger().write("CTR__00001", e);
return;
} finally {
if (pw != null) {
pw.close();
}
}
}
use of jp.ossc.nimbus.service.test.TestScenarioGroup in project nimbus by nimbus-org.
the class CSVTestEstimateReporterService method report.
public void report(TestController controller) {
PrintWriter pw = null;
try {
TestScenarioGroup[] groups = controller.getScenarioGroups();
pw = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
pw.println("scenrioGroup" + "," + "scenario" + "," + "cost");
for (int index = 0; index < groups.length; index++) {
String scenarioGroupId = groups[index].getScenarioGroupId();
TestScenarioGroup testScenarioGroup = controller.getScenarioGroup(scenarioGroupId);
TestScenarioGroup.TestScenarioGroupResource testScenarioGroupResource = testScenarioGroup.getTestScenarioGroupResource();
if (testScenarioGroupResource == null) {
continue;
}
TestScenario[] testScenarios = controller.getScenarios(scenarioGroupId);
pw.println(scenarioGroupId + "," + "" + "," + new BigDecimal(testScenarioGroupResource.getExpectedCost() / rate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
for (int index2 = 0; index2 < testScenarios.length; index2++) {
TestScenario testScenario = testScenarios[index2];
TestScenario.TestScenarioResource testScenarioResource = testScenario.getTestScenarioResource();
if (testScenarioResource == null) {
continue;
}
pw.println("" + "," + testScenario.getScenarioId() + "," + new BigDecimal(testScenarioResource.getExpectedCost() / rate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}
}
pw.flush();
} catch (Exception e) {
ServiceManagerFactory.getLogger().write("CTR__00001", e);
return;
} finally {
if (pw != null) {
pw.close();
}
}
}
use of jp.ossc.nimbus.service.test.TestScenarioGroup in project nimbus by nimbus-org.
the class ScenarioTestView method setupScenarioCombobox.
private void setupScenarioCombobox(String keyword) throws Exception {
this.scenarioCombobox.removeAllItems();
TestScenarioGroup currentScenarioGroup = this.testController.getCurrentScenarioGroup();
if (currentScenarioGroup == null) {
this.scenarioCombobox.setEnabled(false);
return;
}
this.scenarioCombobox.setEnabled(true);
// テストシナリオのコンボボックスを設定
TestScenario[] testScenarioArray = this.testController.getScenarios(currentScenarioGroup.getScenarioGroupId());
if (testScenarioArray != null) {
for (int i = 0; i < testScenarioArray.length; i++) {
String scenarioId = testScenarioArray[i].getScenarioId();
if (keyword == null || keyword.length() == 0 || scenarioId.indexOf(keyword) >= 0) {
this.scenarioCombobox.addItem(scenarioId);
}
// 開始状態の場合
if (testScenarioArray[i] != null && testScenarioArray[i].getStatus() != null && testScenarioArray[i].getStatus().getState() == Status.STARTED) {
String selectScenarioGroupId = currentScenarioGroup.getScenarioGroupId();
String selectScenarioId = testScenarioArray[i].getScenarioId();
TestCase[] testCaseArray = this.testController.getTestCases(selectScenarioGroupId, selectScenarioId);
List testCaseList = new ArrayList();
for (int t = 0; t < testCaseArray.length; t++) {
testCaseList.add(testCaseArray[t]);
}
this.testCasePanel.initialize();
this.testCasePanel.setScenarioGroupId(selectScenarioGroupId);
this.testCasePanel.setScenarioId(selectScenarioId);
this.testCasePanel.setTestCaseList(testCaseList);
this.testCasePanel.addTestCaseControlListener(new TestCaseControlListenerImpl());
this.testCasePanel.setUserId(userId);
}
}
}
}
use of jp.ossc.nimbus.service.test.TestScenarioGroup in project nimbus by nimbus-org.
the class ScenarioTestView method scenarioGroupStartAction.
/**
* シナリオグループ開始ボタンの押下アクション
* @throws Exception
*/
private void scenarioGroupStartAction() throws Exception {
String selectScenarioGroupId = this.scenarioGroupCombobox.getSelectedItem().toString();
TestScenarioGroup obj = testController.getCurrentScenarioGroup();
if (obj != null && obj.getStatus() != null && obj.getStatus().getUserId() != null) {
int result = JOptionPane.showConfirmDialog(this, "シナリオグループは既に開始されていますが、リセットして再度開始しますか?", "確認", JOptionPane.OK_CANCEL_OPTION);
if (JOptionPane.OK_OPTION != result) {
return;
}
}
// シナリオグループの開始
this.testController.startScenarioGroup(this.userId, selectScenarioGroupId);
// シナリオの検索、シナリオ一覧をコンボボックスに設定
this.scenarioCombobox.setEnabled(true);
// シナリオコンボボックスを設定
this.setupScenarioCombobox(null);
// シナリオ系コンポーネントの設定(初期化)
this.setupScenarioComponents();
// テストケース表示パネルの初期化
this.testCasePanel.initialize();
}
Aggregations