DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report

How to Incorporate Slack Alerts Into Your Development Process

Slack is quickly becoming a part of our daily dev lives. You can use your own tool to send Slack notifications, as well as send Slack notifications from BlazeMeter.

Dor Atias user avatar by
Dor Atias
·
Mar. 13, 17 · Tutorial
Like (3)
Save
Tweet
Share
6.72K Views

Join the DZone community and get the full member experience.

Join For Free

Most developers today use instant messaging apps like Slack, HipChat, and Lync. These apps are used to communicate with other company members and to get automated alerts — for example, when their server is down, when a certain service isn’t working, when jobs fail, or when CPU is too high. These notifications are important because they inform you of the status of your development and let you quickly fix what needs fixing. Slack is also more convenient than emails because people often ignore them.

In this blog post, I will show you what you need to do to get Slack notifications and alerts when you’re developing and testing. Then, I'll show you how to get Slack notifications for your BlazeMeter tests.

Let’s go!

1. Create a New Incoming Webhook URL

First, you need to create a new incoming webhook URL on Slack. Webhooks post external messages on Slack, by using HTTP requests with a JSON payload. To do that, go to the Slack site here (you will need to sign in with your team domain).

2. Choose Your Channel

Choose the channel you want to get notifications to and click Add Incoming Webhooks integration.

Image title

3. Copy the URL

Copy the Webhook URL you receive:

Image title

4. Customize

You can customize the image and the name that you will receive notifications from:

Image title

5. Save Your Settings

Pretty self-explanatory.

6. Configure

Paste the URL you copied in the tools you are using for developing or testing. Each tool has a different configuration, so search the documentation for exact instructions on your tool.

For example, the configuration for codecov is defined in a file called codecov.yml. As you can see here, the webhook URL is defined inside the Coverage section. You get Slack notifications from codecov when the unittests-coverage delta is worst from what you demand. 

Image title

Now, BlazeMeter also supports integration with Slack for determining test failure according to the criteria you determine. The notification is sent directly to your channel or private room, so you can handle it quickly and efficiently. Until now, you could receive notifications when the test was saved, when it started and when it ended — but now, you are notified about your test passing or failing.

Go to Workspace settings > Alerts > (+).

You will get this screen:

Image title

2. Configure the alert settings and fill in the email and/or Slack Webhook URL (creation is the same as described above) that you want to receive notifications to. You will get a notification with a link to the report/test according to the trigger you set.

You can also configure Slack alerts via API. Just run the following lines in the command line:

curl -X POST https://a.blazemeter.com/api/v4/usage-alerts -H "Content-Type: application/json" -H "x-api-key: <api_key>" -d '{"email":”<your_email>”,"testConcurrency":<minimum_test_concurrency>,"testDuration":<minimum_test_Duration>,"testEndedEvent":<true/false>,"testFailedEvent":<true/false>,"testPassedEvent":<true/false>,"testSavedEvent":<true/false>,"testStartedEvent":<true/false>,"slackWebhookUrl":"<your_slack_Webhook_Url>","workspaceId":<your_workspace_Id>}'

That’s it! You now know how to get Webhook URLs from Slack, what to do to add them to your tool, and how to add Slack notifications to your BlazeMeter tests.

Slack (software)

Published at DZone with permission of Dor Atias, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Container Security: Don't Let Your Guard Down
  • Steel Threads Are a Technique That Will Make You a Better Engineer
  • Tracking Software Architecture Decisions
  • Multi-Cloud Integration

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: