Skip to main content

Selcukes Notifier

Selcukes Notifier helps to send notifications using Slack and Microsoft Teams.

Motivation

Currently, we moved to On premises environments. To view HTML report generated by automation scripts we need to connect to the different VPN’s to open the report and check the related screenshots to see which test case has failed and why. So, why not raise an alert as soon as the test case fails? And why not attach a screenshot along with that alert so that all the stakeholders can actually see what has failed in the application?

Setup

Selcukes Notifier is primarily used as a Java dependency . We typically use a build tool (such as Maven or Gradle) to resolve the Selcukes Notifier dependency.


<dependency>
<groupId>io.github.selcukes</groupId>
<artifactId>selcukes-notifier</artifactId>
<version>${selcukes.version}</version>
</dependency>

Usage

Add selcukes.yaml and update below config as follows

notifier:
notification: true
type: teams
webhookToken: WEBHOOKXXXX
apiToken: APIXXXX
channel: selcukes
authorIcon: https://github.com/rameshbabuprudhvi.png

Create test class as follows

public class NotifierTest {
@Test
public void testNotifications() {
NotifierFactory.getNotifier()
.scenarioName("This is sample scenario")
.scenarioStatus("FAILED")
.stepDetails("This is sample test step")
.errorMessage("NullPointerException")
.path("")
.pushNotification();
}
}

Subscribe for product updates

By subscribing, you agree with Revue’s Terms of Service and Privacy Policy.