testopia.API
Class TestRun

java.lang.Object
  extended by testopia.API.TestRun

public class TestRun
extends java.lang.Object


Constructor Summary
TestRun(java.lang.String userName, java.lang.String password, java.net.URL url, java.lang.Integer runID)
           
 
Method Summary
 java.util.HashMap<java.lang.String,java.lang.Object> getAttributes()
          Gets the attributes of the test run, runID must not be null
static java.lang.Object[] getList(java.lang.String userName, java.lang.String password, java.net.URL url, java.util.HashMap<java.lang.String,java.lang.Object> values)
          Returns hashmap(s) of testplans that match the inputed values
 java.lang.Object[] getTestCaseRuns()
           
 java.lang.Object[] getTestCases()
           
 int makeTestRun(int buildID, int environmentID, int managerID, int planID, int planTextVersion, java.lang.String summary)
           
 void setBuildID(int buildID)
           
 void setEnvironmentID(int environmentID)
           
 void setManagerID(int managerID)
           
 void setNotes(java.lang.String notes)
           
 void setPlanID(java.lang.Integer newPlanID)
           
 void setStartDate(java.lang.String startDate)
           
 void setStopDate(java.lang.String stopDate)
           
 void setSummary(java.lang.String summary)
           
 void update()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestRun

public TestRun(java.lang.String userName,
               java.lang.String password,
               java.net.URL url,
               java.lang.Integer runID)
Parameters:
userName - your bugzilla/testopia userName
password - your password
url - the url of the testopia server
runID - - Integer the runID, you may enter null here if you are creating a test run
Method Detail

setBuildID

public void setBuildID(int buildID)
Parameters:
buildID - int - the new builID

setEnvironmentID

public void setEnvironmentID(int environmentID)
Parameters:
environmentID - int = the new environemnetID

setManagerID

public void setManagerID(int managerID)
Parameters:
managerID - int - the new managerID

setNotes

public void setNotes(java.lang.String notes)
Parameters:
notes - String - the new notes

setStartDate

public void setStartDate(java.lang.String startDate)
Parameters:
startDate - String - the new startDate (Format: yyyy-mm-dd hh:mm:ss)

setStopDate

public void setStopDate(java.lang.String stopDate)
Parameters:
stopDate - String - the new stopDate (Format: yyyy-mm-dd hh:mm:ss)

setSummary

public void setSummary(java.lang.String summary)
Parameters:
summary - String - the new summary

setPlanID

public void setPlanID(java.lang.Integer newPlanID)
Parameters:
newPlanID - int - the plan that the test run now belongs to

update

public void update()
            throws java.lang.Exception
Throws:
java.lang.Exception

getAttributes

public java.util.HashMap<java.lang.String,java.lang.Object> getAttributes()
                                                                   throws java.lang.Exception
Gets the attributes of the test run, runID must not be null

Returns:
a hashMap of all the values found. Returns null if there is an error and the TestRun cannot be returned
Throws:
java.lang.Exception

getList

public static java.lang.Object[] getList(java.lang.String userName,
                                         java.lang.String password,
                                         java.net.URL url,
                                         java.util.HashMap<java.lang.String,java.lang.Object> values)
Returns hashmap(s) of testplans that match the inputed values

Parameters:
userName - your bugzilla/testopia userName
password - your password
url - the url of the testopia server
values - a HashMap with the parameters that will be searched for if you supply the pair "run_id", 5 then run_id 5 will be returned. Any combination of testrun attributes can be entered and the result will be all matches that fit the inputed values
Returns:

makeTestRun

public int makeTestRun(int buildID,
                       int environmentID,
                       int managerID,
                       int planID,
                       int planTextVersion,
                       java.lang.String summary)
Parameters:
buildID -
environmentID -
managerID -
planID - int - the ID of the plan the run will be added to
planTextVersion -
summary - String - text summary of the run
Returns:
the ID of the test run

getTestCases

public java.lang.Object[] getTestCases()
                                throws java.lang.Exception
Returns:
an array of objects (Object[]) of all the testcases found. Returns null if there is an error and the TestRun cannot be returned
Throws:
java.lang.Exception

getTestCaseRuns

public java.lang.Object[] getTestCaseRuns()
                                   throws java.lang.Exception
Returns:
an array of objects (Object[]) of all the testCaseRuns found. Returns null if there is an error and the TestRun cannot be found
Throws:
java.lang.Exception