Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-25282

IT: tests should be able to run individually and reuse resources

    Details

    • Type: Epic
    • Status: Pull Request Sent (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.5.1.AM3
    • Fix Version/s: 4.14.x
    • Component/s: openshift
    • Labels:
      None
    • Epic Name:
      allow tests to be run individually and re-use OS resources
    • Epic Status:
      To Do

      Description

      • integration tests should reuse OpenShift resources, not start from scratch in each test. Creating OpenShift applications for instance can easily take up to several minutes. Multiply this by ex. 100 tests and we're easily at a runtime of several hours for the whole suite.
        The Requirements that we have in reddeer OpenShift were create with re-using resources in mind.
        • Ex. annotating a test class with
          @RequiredProject(
          		name = DatastoreOS3.TEST_PROJECT)
          

          makes sure that there's a project "test-project" that exists in the OpenShift server that's being used. If it exists, the annotation would do nothing. It creates it if it doesnt exist.
          The required project (either pre-existing the test or created upfront if it didnt) is injected into the test via

          @InjectRequirement
          protected static OpenShiftProjectRequirement requiredProject;
          
        • Ex. annotating a test class with
          @RequiredService(
          		project = DatastoreOS3.TEST_PROJECT, 
          		service = OpenShiftResources.NODEJS_SERVICE, 
          		template = OpenShiftResources.NODEJS_TEMPLATE)
          

          makes sure that the test has a service called "nodejs-example" available. If it exists it wont do anything. If it doesn't, it'll create it using the NODEJS_TEMPLATE provided in the annotation.

      • All tests should be able to run indivdiually. When developing integration tests for a new feature, running the whole suite gets a big impediment. We should therefore allow all tests to be run individually

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jkopriva Josef Kopriva
                  Reporter:
                  adietish André Dietisheim
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: