Package au.edu.mq.comp.junitGrading

Examples of au.edu.mq.comp.junitGrading.TestResult


          }
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
        System.out.println("============D O N E==============");
        return dataFormatter.toString();
        }
View Full Code Here


   
   
    @Override
    public TestResult gradeAnAssignment(Assignment assignment)
    {
      TestResult runResult = new TestResult(assignment.ownerIdentification());
        try
        {
          if(true == this.compile(assignment, runResult))
            this.run(assignment, runResult);           
        }
        catch(Exception e)
        {           
            runResult.appendResult("RunResult", "ExceptionThrown");
            runResult.setErrorMessage("exception raised -->" + e.toString());
           
            Log.error(runResult.errorMessage());
            e.printStackTrace();
        }
        try
        {
          SimpleFileIO.writeStringToTextFile(runResult.toString(), assignment.containerDirectory().getAbsolutePath() + File.separator + "runResult.txt");
        }
        catch(Exception e)
        {
          Log.error("Fail to write run result to " + assignment.containerDirectory().getAbsolutePath());
        }
View Full Code Here

      grader.addJUnitTestSource("comp125.zip");
     
      // start processing(using single thread)
      while(true == ca.hasMoreAssignment())
      {
        TestResult result = grader.gradeAnAssignment(ca.nextAssignment());
        System.out.println(result);
      }
     
      // done
      System.out.println("done");
View Full Code Here

        CSVFormatter dataFormatter = new CSVFormatter();
        //keeping getting the TestResult until done
        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
       
        //write result.csv
        SimpleFileIO.writeStringToTextFile(dataFormatter.toString(), "Result.csv");
View Full Code Here

          }
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
        System.out.println("============D O N E==============");
        return dataFormatter.toString();
        }
View Full Code Here

            workGroup.pushWorkData(assignment);
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
       
        return dataFormatter.toString();
        }
View Full Code Here

          }
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
        System.out.println("============D O N E==============");
        return dataFormatter.toString();
        }
View Full Code Here

            workGroup.pushWorkData(assignment);
        }

        while(0 < workGroup.currentDataCount())
        {
          TestResult result = workGroup.popWorkResult();
          dataFormatter.addRow(result);
        }
       
        return dataFormatter.toString();
        }
View Full Code Here

TOP

Related Classes of au.edu.mq.comp.junitGrading.TestResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.