Skip to content

(M) Tigase TTS-NG

License

AGPL-3.0, AGPL-3.0 licenses found

Licenses found

AGPL-3.0
License.html
AGPL-3.0
COPYING
Notifications You must be signed in to change notification settings

tigase/tigase-tts-ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tigase Monitor screenshot

Tigase Logo Build Status

Tigase TTS-NG

XMPP funcional test framework with sizeable suite of tests based on the jaxmpp2 and TestNG framework as a successor of tigase-testsuite

Current results for Tigase XMPP Server can be found on our pages: Stable and Snapshot releases

Features

  • Over 200 funcional XMPP tests:
    • Core XMPP
    • MultiUserChat
    • PubSub
    • MAM
  • Easy, automatic operation
  • Easy way to add more tests
  • (Optional) Downloading latest release of Tigase XMPP Server
  • (Optional) Automatic preparaion of the database, supports:
    • MySQL
    • PostgreSQL
    • Derby
    • MongoDB
    • MS SQL Server

How to Start

Running

The whole suite execution can be handled via $ ./scripts/tests-runner.sh shell script. Executing it without any parameters will yield help:

$ ./scripts/tests-runner.sh
Run selected or all tests for defined server
----
  --all-tests [(database)] :: Run all available tests
          (database) is an array, if database is missing tests will be run against all configured ones
                     possible values: derby, mysql, postgresql, sqlserver, mongodb
  --custom <package.Class[#method]]> [(database)] :: Run defined test, accepts wildcards, eg.:
          --custom tigase.tests.util.RetrieveVersion
  --help :: print this help
----
  Special parameters only at the beginning of the parameters list
  --debug|-d                   Turns on debug mode
  --skip-rebuild-tts|-srb      Turns off rebuilding TTS-NG and only runs already build tests
  --skip-summary-page-get|-sp  Turns off automatic generation of Summary Page
  --download-latest|-dl        Turns on downloading latest Tigase Server release
  --reload-db|-db              Turns on reloading database
  --start-server|-serv         Turns on starting Tigase server
-----------
  Other possible parameters are in following order:
  [server-dir] [server-ip]

You should copy scripts/tests-runner-settings.dist.sh to scripts/tests-runner-settings.sh and adjust settings before running.

Adding new tests

The easiest way to add new test is to extend tigase.tests.AbstractTest (AbstractTest.java), take a look at ExampleJaxmppTest.java to get general idea:

package tigase.tests;

import org.testng.annotations.Test;
import tigase.jaxmpp.j2se.Jaxmpp;
import tigase.tests.utils.Account;

import static org.testng.Assert.assertTrue;
import static tigase.TestLogger.log;

public class ExampleJaxmppTest
		extends AbstractTest {

	@Test(groups = {"examples"}, description = "Simple test verifying logging in by the user")
	public void SimpleLoginTest() {

		try {
			log("This is test case");

			Jaxmpp contact = getAdminAccount().createJaxmpp().setConnected(true).build();

			assertTrue(contact.isConnected(), "contact was not connected");

			if (contact.isConnected()) {
				contact.disconnect();
			}

			Account createUserAccount = createAccount().setLogPrefix("test_user").build();
			Jaxmpp createJaxmpp = createUserAccount.createJaxmpp().build();
			createJaxmpp.login(true);

			assertTrue(createJaxmpp.isConnected(), "contact was not connected");

		} catch (Exception e) {
			fail(e);
		}
	}
}

Support

When looking for support, please first search for answers to your question in the available online channels:

If you didn't find an answer in the resources above, feel free to submit your question to either our community portal or open a support ticket

Compilation

It's a Maven project therefore after cloning the repository you can easily build it with:

mvn -Pdist clean install

License

Tigase Tigase Logo Official Tigase repository is available at: https://github.com/tigase/tigase-tts-ng/.

Copyright (c) 2004 Tigase, Inc.

Licensed under AGPL License Version 3. Other licensing options available upon request.