Giter VIP home page Giter VIP logo

tigase-tts-ng's Introduction

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.

tigase-tts-ng's People

Contributors

arthef avatar bmalkow avatar dependabot[bot] avatar hantu85 avatar qianqianluo avatar woj-tek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.