From 3b88a6cba7d765bab312911a137ef48ec6dfe1c4 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Tue, 16 Jun 2015 14:13:03 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 1bd92e8..a6cca88 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -544,6 +544,8 @@ public class TestingList extends Panel { boolean bSelected = false; String sDeviceName; String sTestName; + String sTestCaseName; + String sTestPath; HashMap args = new HashMap(); //scan through the table starting from 'position' and execute the first selected test found int row = position; @@ -555,13 +557,21 @@ public class TestingList extends Panel { if (bSelected) { sDeviceName = jTable1.getValueAt(row, COL.DEVICENAME.ordinal()).toString(); sTestName = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString(); + sTestCaseName = jTable1.getValueAt(row, COL.TESTSUITE.ordinal()).toString(); + sTestPath = "\\script\\tests\\tests\\" + sTestCaseName + "\\" + sTestName + ".py"; + File f = new File(sTestPath); + if(!f.exists() || f.isDirectory()){ + logger.log(Level.SEVERE, "Test file not found: " + sTestPath); + showResult(sDeviceName, sTestName, "Test file not found: " + sTestPath, TestStatus.FAILURE.toString()); + return; + } showResult(sDeviceName, sTestName, "Test running", TestStatus.RUNNING.toString()); //launch the test try{ args.put("DEVICE", sDeviceName); args.put("ret", ""); args.put("status", false); - runAsync(sTestName, args); + runAsync(sTestPath, args); } catch (Exception ex) { SwingUtils.showMessage(this, "executeTest()", ex.toString()); logger.log(Level.SEVERE, ex.toString());