Skip to content

Architecture

dipranjan edited this page Nov 25, 2018 · 8 revisions

The entire architecture can be broken down into 3 components:

  • Install and Start a MQTT Broker -- We will use cloudmqttbroker [free plan]
  • Write an application that publishes messages -- This will be done by Paho MQTT in the mqttMessagingServices class
  • Write an application that consumes messages -- This will be done by the android app

TestNG listeners

If you have used TestNG or implemented Extent/Allure reporting with TestNG then you already are aware of the listener classes. In short TestNG listener always extends org.testng.ITestNGListener and TestNG provides many listener types.

Some of the methods which we have used from ITestListener are as follows:

  • onStart is invoked after the test class is instantiated and before any configuration method is called.
  • onTestSuccess is invoked on success of a test.
  • onTestFailure is invoked on failure of a test.
  • onTestSkipped is invoked whenever a test is skipped.
  • onTestFailedButWithinSuccessPercentage is invoked each time a method fails but is within the success percentage requested.
  • onFinish is invoked after all the tests have run and all their Configuration methods have been called.

We will use these methods to send data to the messaging system as per the suite progression.

Messaging System

MQTT (MQ Telemetry Transport) is a lightweight publish/subscribe messaging protocol. MQTT is used a lot in the Internet of Things applications, since it has been designed to run on remote locations with system with small footprint. The MQTT 3.1 is an OASIS standard, and you can find all the information at http://mqtt.org/

The

Clone this wiki locally