Class TestCases

java.lang.Object
com.testmonitor.actions.TestCases

public class TestCases extends Object
  • Constructor Details

    • TestCases

      public TestCases(Connector connector, Project project)
      Parameters:
      connector - The TestMonitor connector to perfom HTTP requests
      project - The project you want to work on
  • Method Details

    • list

      public ArrayList<TestCase> list()
      Returns:
      A list of test cases
    • list

      public ArrayList<TestCase> list(Integer page)
      Returns:
      A list of test cases
    • list

      public ArrayList<TestCase> list(Integer page, Integer limit)
      Returns:
      A list of test cases
    • get

      public TestCase get(Integer id)
      Parameters:
      id - The test case ID
      Returns:
      The test case that matches the ID
    • search

      public ArrayList<TestCase> search(String search)
      Search a test case
      Parameters:
      search - The search string
      Returns:
      A list of results
    • search

      public ArrayList<TestCase> search(String search, Integer testSuiteId)
      Search a test case
      Parameters:
      search - The search string
      Returns:
      A list of results
    • create

      public TestCase create(TestCase testCase)
      Create a test case in TestMonitor
      Parameters:
      testCase - The test case your want to create
      Returns:
      The created test case
    • create

      public TestCase create(String name, Integer testSuiteId)
      Create a test case in TestMonitor
      Parameters:
      name - The name of the test case
      testSuiteId - The ID of the test suite
      Returns:
      The created test case
    • create

      public TestCase create(String name, TestSuite testSuite)
      Create a test case in TestMonitor
      Parameters:
      name - The name of the test case
      testSuite - The ID of the test suite
      Returns:
      The created test case
    • findOrCreate

      public TestCase findOrCreate(String search, TestSuite testSuite)
      Search or create a test case. When the test case is not found there will be a test case created.
      Parameters:
      search - The search query
      Returns:
      The first result or a fresh created test case
    • findOrCreate

      public TestCase findOrCreate(TestCase testCase)
      Search or create a test case. When the test case is not found there will be a test case created.
      Parameters:
      testCase - The search query
      Returns:
      The first result or a fresh created test case
    • findOrCreate

      public TestCase findOrCreate(String search, Integer testSuiteId)
      Search or create a test case. When the test case is not found there will be a test case created.
      Parameters:
      search - The search query
      Returns:
      The first result or a fresh created test case
    • update

      public TestCase update(TestCase testCase)
      Update a test case
      Parameters:
      testCase - The test case you want to update
      Returns:
      A new instance of the project