Class AppTestBase

java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.openapi.tck.AppTestBase
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener
Direct Known Subclasses:
AirlinesAppTest, BeanValidationDisabledTest, BeanValidationTest, FilterTest, ModelReaderAppTest, ModelReaderAppWithJustComponentTest, ModelReaderAppWithJustWebHookTest, OASConfigScanClassBase, OASConfigScanDisableTest, OASConfigSchemaTest, OASConfigServersTest, OASScanConfigTests.ScanConfigExcludeMultiple, OASScanConfigTests.ScanConfigExcludeOnly, OASScanConfigTests.ScanConfigIncludeMultiple, OASScanConfigTests.ScanConfigIncludeOnly, OASScanConfigTests.ScanConfigPackageExcludeClassInclude, OASScanConfigTests.ScanConfigPackageExcludeMultiple, OASScanConfigTests.ScanConfigPackageExcludeOnly, OASScanConfigTests.ScanConfigPackageExcludesAroundInclude, OASScanConfigTests.ScanConfigPackageIncludeClassExclude, OASScanConfigTests.ScanConfigPackageIncludeMultiple, OASScanConfigTests.ScanConfigPackageIncludeOnly, OASScanConfigTests.ScanConfigPackageIncludesAroundExcludes, OASScanConfigTests.ScanConfigPartialPackage, PetStoreAppTest, StaticDocumentCustomDialectTest, StaticDocumentTest

public abstract class AppTestBase extends org.jboss.arquillian.testng.Arquillian
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.jboss.arquillian.testng.Arquillian

    org.jboss.arquillian.testng.Arquillian.UpdateResultListener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final io.restassured.filter.Filter
     

    Fields inherited from class org.jboss.arquillian.testng.Arquillian

    ARQUILLIAN_DATA_PROVIDER
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.restassured.response.ValidatableResponse
     
    void
     
    static String
    dereference(io.restassured.response.ValidatableResponse vr, String path)
    Lookup the object at the provided path in the response and if the object is a reference (contains a $ref property), return the reference path.
    static String
    dereference(io.restassured.response.ValidatableResponse vr, String... paths)
    Builds an absolute path using the series of provided relative paths by sequentially searching through the provided ValidatableResponse.
    Object[][]
     

    Methods inherited from class org.jboss.arquillian.testng.Arquillian

    arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • YAML_FILTER

      protected static final io.restassured.filter.Filter YAML_FILTER
  • Constructor Details

    • AppTestBase

      public AppTestBase()
  • Method Details

    • configureRestAssured

      @BeforeClass public void configureRestAssured() throws MalformedURLException
      Throws:
      MalformedURLException
    • callEndpoint

      public io.restassured.response.ValidatableResponse callEndpoint(String type)
    • dereference

      public static String dereference(io.restassured.response.ValidatableResponse vr, String path)
      Lookup the object at the provided path in the response and if the object is a reference (contains a $ref property), return the reference path. If the object is not a reference, return the input path.
      Parameters:
      vr - the response
      path - a path which may be a reference object (containing a $ref)
      Returns:
      the path the object references if present, else the input path
    • dereference

      public static String dereference(io.restassured.response.ValidatableResponse vr, String... paths)
      Builds an absolute path using the series of provided relative paths by sequentially searching through the provided ValidatableResponse. Each time a $ref is encountered as a key in the path node, it is treated as an absolute (within the response) path that is used as the context for the next paths entry.

      Consider the following simple schemas as the response content of the ValidatableResponse argument:

       {
         "components": {
           "schemas": {
             "Person": {
               "type": "object",
               "properties": {
                 "firstName": {
                   "type": "string"
                 },
                 "lastName": {
                   "type": "string"
                 }
               }
             },
             "Employee": {
               "$ref": "#/components/schemas/Person"
             }
           }
         }
       }
       
      Given the paths "components.schemas.Employee" and "properties.firstName", the value returned is the absolute path "components.schemas.Person.properties.firstName". The path segment "components.schemas.Employee" contains a .$ref which itself resolves to the schema "components.schemas.Person" and the second path segment is appended to the resolved reference. Note that this method does not currently support the conversion of Json Pointer escape sequences (~0 and ~1) in $ref values.
      Parameters:
      vr - the response
      paths - paths which may be a reference object (containing a $ref)
      Returns:
      the path the object references if present, else the input path
    • provide

      @DataProvider(name="formatProvider") public Object[][] provide()