Skip to content

XMPP-Interop-Testing/xmpp-interop-tests-drone-plugin

Repository files navigation

xmpp-interop-tests-drone-plugin

A Drone plugin that performs XMPP interoperability tests on an XMPP domain.

This plugin can be used in several different CI environments, including:

Note that most CI environments have a distinct way to configure this plugin.

For more information, please visit our project website at https://xmpp-interop-testing.github.io/

Inputs

The plugin can be configured using the following settings:

  • host: IP address or DNS name of the XMPP service to run the tests on. Default value: 127.0.0.1
  • domain: the XMPP domain name of server under test. Default value: example.org
  • timeout: the amount of milliseconds after which an XMPP action (typically an IQ request) is considered timed out. Default value: 5000 (five seconds)
  • adminAccountUsername: (optional) The account name of a pre-existing user that is allowed to create other users, per XEP-0133. See: "Provisioning Test Accounts"
  • adminAccountPassword: (optional) The password of the admin account.
  • accountOneUsername: (optional) The first account name of a set of three accounts used for testing. See: "Provisioning Test Accounts"
  • accountOnePassword: (optional) The password of the accountOneUsername account.
  • accountTwoUsername: (optional) The second account name of a set of three accounts used for testing. See: "Provisioning Test Accounts"
  • accountTwoPassword: (optional) The password of the accountTwoUsername account
  • accountThreeUsername: (optional) The third account name of a set of three accounts used for testing. See: "Provisioning Test Accounts"
  • accountThreePassword: (optional) The password of the accountThreeUsername account.
  • disabledTests: (optional) A comma-separated list of tests that are to be skipped. For example: EntityCapsTest,SoftwareInfoIntegrationTest
  • disabledSpecifications: (optional) A comma-separated list of specifications (not case-sensitive) that are to be skipped. For example: XEP-0045,XEP-0060
  • enabledTests: (optional) A comma-separated list of tests that are the only ones to be run. For example: EntityCapsTest,SoftwareInfoIntegrationTest
  • enabledSpecifications: (optional) A comma-separated list of specifications (not case-sensitive) that are the only ones to be run. For example: XEP-0045,XEP-0060
  • failOnImpossibleTest: (optional) If set to 'true', fails the test run if any configured tests were impossible to execute. (default: 'false')
  • logDir: (optional) The directory in which the test output and logs are to be stored. This directory will be created, if it does not already exist. Default value: ./output

Provisioning Test Accounts

To be able to run the tests, the server that is being tested needs to be provisioned with test accounts. Three different mechanisms can be used for this:

  • Admin Account - By configuring the username and password of a pre-existing administrative user, using the adminAccountUsername and adminAccountPassword configuration options, three test accounts will be created using XEP-0133: Service Administration functionality.
  • Explicit Test Accounts - You can configure three pre-existing accounts that will be used for testing, using the accountOneUsername, accountOnePassword, accountTwoUsername, accountTwoPassword, accountThreeUsername and accountThreePassword configuration options.
  • In-Band Registration - If no admin account and no explicit test accounts are provided, in-band registration (XEP-0077) will be used to provision accounts.

Basic Configuration (for Drone)

- name: runtests
  image: ghcr.io/xmpp-interop-testing/drone-xmpp-test:latest
  settings:
    host: xmppserver
    domain: shakespeare.lit
    adminAccountUsername: admin
    adminAccountPassword: admin
    enabledSpecifications: XEP-0115,XEP-0199,XEP-0352

Basic Configuration (for Harness)

- step:
    type: Plugin
    name: Run XMPP Interop Framework tests against XMPP server
    identifier: Run_Tests_against_XMPP_server
    description: Executes the Drone Plugin against the XMPP server that has been created earlier in this Pipeline
    spec:
      image: ghcr.io/xmpp-interop-testing/drone-xmpp-test:latest
      reports:
        type: JUnit
        spec:
          paths:
            - "**/*.xml"
      settings:
        host: xmppserver
        domain: shakespeare.lit
        adminAccountUsername: admin
        adminAccountPassword: admin
        enabledSpecifications: XEP-0115,XEP-0199,XEP-0352

Basic Configuration (for Woodpecker)

- name: runtests
  image: ghcr.io/xmpp-interop-testing/drone-xmpp-test:latest
  settings:
    host: xmppserver
    domain: shakespeare.lit
    adminAccountUsername: admin
    adminAccountPassword: admin
    enabledSpecifications: XEP-0115,XEP-0199,XEP-0352

Usage Example

It is expected that this plugin is used in a continuous integration flow that creates a new build of the XMPP server that is to be the subject of the tests.

Very generically, the xmpp-interop-tests-drone-plugin is expected to be part of such a flow in this manner:

  1. Compile and build server software
  2. Start server
  3. Invoke xmpp-interop-tests-drone-plugin

The way how that's done can differ per CI environment that uses this plugin. Please find more detailed examples in the documentation page that's provided on our website:

About

A Drone plugin that performs XMPP interoperability tests on an XMPP domain.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •