Skip navigation links
com.auxiliary.http

Class ReadInterfaceFromXml

    • Constructor Detail

      • ReadInterfaceFromXml

        public ReadInterfaceFromXml(File xmlFile)
        根据xml文件对象,解析接口信息xml文件,并设置接口执行环境及接口默认执行环境
        Parameters:
        xmlFile - xml文件类对象
        Since:
        autest 3.3.0
    • Method Detail

      • getExtractContent

        public Set<String> getExtractContent(String interName)
        Description copied from interface: ExtractResponse
        该方法用于指定接口的报文提词内容json串集合

        json串的键值可通过静态属性获取,当没有断言内容时,则json中的键都为空值

        Specified by:
        getExtractContent in interface ExtractResponse
        Parameters:
        interName - 接口名称
        Returns:
        接口响应报文提词内容json串集合
      • getAssertContent

        public Set<String> getAssertContent(String interName)
        Description copied from interface: AssertResponse
        该方法用于返回指定接口的断言内容json串

        json串的键值可通过静态属性获取,当没有断言内容时,则json中的键都为空值

        Specified by:
        getAssertContent in interface AssertResponse
        Parameters:
        interName - 接口名称
        Returns:
        接口断言内容json串
      • getInterface

        public InterfaceInfo getInterface(String interName,
                                          String environmentName)
        Description copied from interface: ActionEnvironment
        该方法用于根据接口名称及所在环境,返回接口的信息类对象
        Specified by:
        getInterface in interface ActionEnvironment
        Parameters:
        interName - 接口名称
        environmentName - 环境名称
        Returns:
        接口信息类对象
      • getInterface

        public InterfaceInfo getInterface(String interName,
                                          String envGroupName,
                                          String environmentName)
        Description copied from interface: ActionEnvironmentGroup
        该方法用于根据接口名称及所在环境,返回接口的信息类对象
        Specified by:
        getInterface in interface ActionEnvironmentGroup
        Parameters:
        interName - 接口名称
        envGroupName - 环境组名称
        environmentName - 环境名称
        Returns:
        接口信息类对象
      • getInterfaceGroup

        public Map<String,InterfaceInfo> getInterfaceGroup(String groupName)
        该方法用于按照接口文件中编写的接口顺序,返回接口组中的所有接口集合
        Specified by:
        getInterfaceGroup in interface InterfaceGroup
        Parameters:
        groupName - 接口组名称
        Returns:
        接口组中的接口集合
        Throws:
        InterfaceReadToolsException - 当接口组信息读取错误时,抛出的异常
        Since:
        autest 4.4.0
      • getInterfaceGroup

        public Map<String,InterfaceInfo> getInterfaceGroup(String groupName,
                                                           String envGroupName,
                                                           String environmentName,
                                                           boolean isOrderlyStorage)
        该方法用于按照指定的存储方式,返回接口组中的所有接口集合
        Parameters:
        groupName - 接口组名称
        envGroupName - 环境组名称
        environmentName - 环境名称
        isOrderlyStorage - 是否有序存储,传入true则表示按照有序的方式进行存储;反之,则以无序的方式进行存储
        Returns:
        接口组中的接口集合
        Throws:
        InterfaceReadToolsException - 当接口组信息读取错误时,抛出的异常
        Since:
        autest 4.4.0
        See Also:
        getInterfaceGroup(String)
      • getParentInterfaceName

        public List<String> getParentInterfaceName(String interName)
        Description copied from interface: BeforeOperation
        该方法用于返回接口的所有父层接口名称(不包括当前接口名称)
        Specified by:
        getParentInterfaceName in interface BeforeOperation
        Parameters:
        interName - 接口名称
        Returns:
        父层接口名称集合

Copyright © 2024. All rights reserved.