TestopiaTestCase
Keywords: testopia.API.TestopiaTestCase class

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## testopia.API
Class TestopiaTestCase

    java.lang.Object
      testopia.API.TestopiaTestCase

    public class TestopiaTestCase

extends java.lang.Object

Constructor Summary
`TestopiaTestCase(java.lang.String userName, java.lang.String password, java.net.URL url, java.lang.Integer caseID)`

Method Summary
`void` | `addComponent(int componentID)` Adds a component to the testCase
`java.util.HashMap<java.lang.String,java.lang.Object>` | `getAttributes()` Gets the attributes of the test case, caseID must not be null
`int` | `getBuildIDByName(java.lang.String categoryName)`
`java.lang.Object[]` | `getComponents()` Gets the components as an array of hashMaps or null if an error occurs
`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 testcases that match the inputed values
`int` | `makeTestCase(int authorID, int caseStatusID, int categoryID, boolean isAutomated, int planID, java.lang.String summary, java.lang.Integer priorityID)`
`void` | `removeComponent(int componentID)` Removes a component to the testCase
`void` | `setAlias(java.lang.String alias)`
`void` | `setArguments(java.lang.String arguments)`
`void` | `setCanview(boolean canview)`
`void` | `setCaseStatusID(java.lang.String caseStatusID)`
`void` | `setCategoryID(int categoryID)`
`void` | `setDefaultTesterID(int defaultTesterID)`
`void` | `setIsAutomated(boolean isAutomated)`
`void` | `setPriorityID(int priorityID)`
`void` | `setRequirement(java.lang.String requirement)`
`void` | `setScript(java.lang.String script)`
`void` | `setSummary(java.lang.String summary)`
`void` | `update()` Updates are not called when the .set is used.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TestopiaTestCase

    public TestopiaTestCase(java.lang.String userName,
                            java.lang.String password,
                            java.net.URL url,
                            java.lang.Integer caseID)

Parameters:
  `userName` - your bugzilla/testopia userName
  `password` - your password
  `url` - the url of the testopia server
  `caseID` - - Integer the caseID, you may enter null here if you are creating a test case

Method Detail

### setAlias

    public void setAlias(java.lang.String alias)

  Parameters:
    `alias` - String - the new Alias

### setArguments

    public void setArguments(java.lang.String arguments)

  Parameters:
    `arguments` - String - the new arguments

### setCanview

    public void setCanview(boolean canview)

  Parameters:
    `canview` -

### setCaseStatusID

    public void setCaseStatusID(java.lang.String caseStatusID)

  Parameters:
    `caseStatusID` - String - the new case Status ID

### setCategoryID

    public void setCategoryID(int categoryID)

  Parameters:
    `categoryID` - int - the new categorID

### setDefaultTesterID

    public void setDefaultTesterID(int defaultTesterID)

  Parameters:
    `defaultTesterID` - int - the new defaultTesterID

### setIsAutomated

    public void setIsAutomated(boolean isAutomated)

  Parameters:
    `isAutomated` - boolean - true if it's to be set automated, false otherwise

### setPriorityID

    public void setPriorityID(int priorityID)

  Parameters:
    `priorityID` - - int the new priorityID

### setRequirement

    public void setRequirement(java.lang.String requirement)

  Parameters:
    `requirement` - String - the new requirement

### setScript

    public void setScript(java.lang.String script)

  Parameters:
    `script` - String - the new script

### setSummary

    public void setSummary(java.lang.String summary)

  Parameters:
    `summary` - String - the new summary

### addComponent

    public void addComponent(int componentID)
                      throws java.lang.Exception

  Adds a component to the testCase

  Parameters:
    `componentID` - the ID of the component that will be added to the testCase
  Throws:
    `java.lang.Exception`

### removeComponent

    public void removeComponent(int componentID)
                         throws java.lang.Exception

  Removes a component to the testCase

  Parameters:
    `componentID` - the ID of the component that will be removed from the testCase
  Throws:
    `java.lang.Exception`

### getComponents

    public java.lang.Object[] getComponents()
                                     throws java.lang.Exception

  Gets the components as an array of hashMaps or null if an error occurs

  Returns:
    an array of component hashMaps or null
  Throws:
    `java.lang.Exception`

### update

    public void update()
                throws java.lang.Exception

  Updates are not called when the .set is used. You must call update after all your sets to push the changes over to testopia.

  Throws:
    `java.lang.Exception` - if planID is null (you made the TestCase with a null caseID and have not created a new test plan)

### makeTestCase

    public int makeTestCase(int authorID,
                            int caseStatusID,
                            int categoryID,
                            boolean isAutomated,
                            int planID,
                            java.lang.String summary,
                            java.lang.Integer priorityID)

  Parameters:
    `authorID` - the bugzilla/testopia ID of the author
    `caseStatusID` -
    `categoryID` -
    `isAutomated` -
    `planID` - the ID of the plan the testCase will be added to
    `summary` - string - the summary of the testCase. Null allowed
    `priorityID` - Integer - the priority of the testCase (0-5). Null allowed
  Returns:

### getAttributes

    public java.util.HashMap<java.lang.String,java.lang.Object> getAttributes()
                                                                       throws java.lang.Exception

  Gets the attributes of the test case, caseID must not be null

  Returns:
    a hashMap of all the values found. Returns null if there is an error and the TestCase 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 testcases 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 "case_id", 5 then case_id 5 will be returned. Any combination of testcase attributes can be entered and the result will be all the matches that fit the inputed values
  Returns:

### getBuildIDByName

    public int getBuildIDByName(java.lang.String categoryName)

  Parameters:
    `categoryName` - the name of the category that the ID will be returned for. This will search within the test plans that this test case belongs to and return the first category with a matching name. 0 Will be returned if the category can't be found
  Returns:
    the ID of the specified product

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD