Integrate Email Testing Service: Inbucket from Development to integration testing
LyLuongThien
17 views
18 slides
Jun 26, 2024
Slide 1 of 18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
About This Presentation
Discover seamlessly integrating Inbucket, an open-source email testing application, into your in-house email service. This presentation will guide you through the entire process, from initial development setup to comprehensive integration testing. Learn how Inbucket can enhance your development work...
Discover seamlessly integrating Inbucket, an open-source email testing application, into your in-house email service. This presentation will guide you through the entire process, from initial development setup to comprehensive integration testing. Learn how Inbucket can enhance your development workflow, improve quality control, and provide a reliable environment for email verification. Whether you're a developer, software engineer, or system administrator, this session will equip you with the tools and knowledge to optimize your email testing processes with Inbucket.
***
Presented by Thien Ly on June 26, 2023 - During the Final Working Week at Groove Technology.
Size: 688 KB
Language: en
Added: Jun 26, 2024
Slides: 18 pages
Slide Content
Integrate Email Testing Service: Inbucket from Development to integration testing Present by Thien Ly on June 26, 2024
Table of content * Intro to Inbucket - About Inbucket - Why Inbucket - Features - Pros and cons - Alternatives * Demo - Quick installation with docker - Integration testing and E2E implementation with puppeteer - Write a real-time email reader library for Inbucket * Q&A
Introduction to Inbucket
About inbucket “Inbucket is an email testing application ; it will accept messages for any email address and make them available to view via a web interface”. Inbucket is an email testing application designed for developers to test and debug outbound emails. Accepts messages for any email address and makes them viewable via a web interface. Acts as a disposable webmail and RESTful server. No database required, making setup and maintenance straightforward..
Why inbucket Secrecy: Keeps new applications secret until release. Integration Tests: Validates email sending in integration test suites. Security: Demonstrates email features without sharing personal email credentials. Isolation for testing: Load Testing: Avoids overloading corporate email servers during load tests. Data Safety: Uses production data in test environments without leaking test emails to end users. Preview Capability: Previews emails in multiple desktop email clients.
Features Protocols Supported : SMTP and POP3 with optional SSL. Installation Options : Binary installs for Linux, Docker. Main Website : inbucket.org GitHub Repository : github.com/inbucket/inbucket
Pros & Cons
Pros Speed up development: Easy setup and configuration. No database needed. Flexible and lightweight. Useful for both development and testing environments. Safety sensitive data for development
Cons Limited to email testing (not a full-featured email server). Basic web interface may not meet all needs.
Alternatives Mailinator: 3rd party email testing service. MailHog: Web and API based SMTP testing (only smtp protocol). StalwartLabs/MailServer: full feature mail server.
Demo
Demo: Installation Environment configuration : Access the web configurator at https://inbucket.org/configurator Example configuration: INBUCKET_STORAGE_TYPE : "file" INBUCKET_STORAGE_PARAMS : "path:/inbucket/storage" INBUCKET_SMTP_ADDR : "0.0.0.0:2500" INBUCKET_WEB_ADDR : "0.0.0.0:9000"
Demo: Installation Docker: Pull the Inbucket Docker image: docker pull inbucket/inbucket Run Inbucket: docker run -d -p 9000:9000 -p 2500:2500 -p 1100:1100 inbucket/inbucket Access the web interface at http://localhost:9000
Demo: Installation - Usage Use as normal SMTP service in development application: An example with nodemailer package, and then check the result on web interface at http://localhost.c: 9000/monitor import nodemailer from "nodemailer" ; const transporter = nodemailer.createTransport({ host: 'inbucket' , port: 2500 }); await transporter.sendMail({ to: "[email protected]" , html: "<p>Hello there</p>" , subject: "Email to Inbucket" , from: "[email protected]" , });
Demo: real-time email reader library Inbucket API v1 does not have an interface to retrieve new email in real time. We have to write our own library leveraging websocket connection of inbucket private API. Demo library open-sourced on: https://github.com/groovetch/inbucket-gt-client https://www.npmjs.com/package/@cute-me-on-repos/inbucket-gt-client
Demo: Integration and E2E testing Demonstration with Groove internal projects