Programming Tips 💡
54.5K subscribers
65 photos
8 videos
30 files
338 links
Programming:
Tips 💡
Articles 📕
Resources 👾
Design Patterns 💎
Software Principles

🇳🇱 Contact & Ads: @MoienTajik
Download Telegram
Ngrok 🔥

Ngrok allows you to expose a web server running on your local machine to the internet. 🌐

Just tell ngrok what port your web server is listening on :👂🏻

ngrok http [port] -host-header="localhost:[port]"


Result :

Tunnel Status : online
Version : 2.0/2.0
Web Interface : 127.0.0.1:4040
Forwarding : http://92832de0.ngrok.io
Forwarding : https://92832de0.ngrok.io


You can now access your website from :
http://92832de0.ngrok.io

When you start ngrok, it will display a UI in your terminal with the public URL of your tunnel and other status and metrics information about connections made over your tunnel 🛠.


Inspecting Your Traffic 📊

Ngrok provides a real-time web UI where you can introspect all of the HTTP traffic running over your tunnels. 👀

After you've started ngrok, just open http://localhost:4040 in a web browser to inspect request details. 🌀


https://t.me/pgimg/122

[ Docs ] : ngrok.com/docs


#Ngrok #Testing
@ProgrammingTip
BDDfy

BDDfy
is the simplest BDD framework to use, customize and extend❗️

A few quick facts about BDDfy :

It can run with any testing framework. Actually you don't have to use a testing framework at all. You can just apply it on your POCO (test) classes.

It does not need a separate test runner. You can use your runner of choice. For example, you can write your BDDfy tests using NUnit and run them using NUnit console or GUI runner, Resharper or TD.Net and regardless of the runner, you will get the same result. 🔥

It can run standalone scenarios. In other words, although BDDfy supports stories, you do not necessarily have to have or make up a story to use it. This is useful for developers who work in non-Agile environments but would like to get some decent testing experience. 💎

You can use underscored or pascal or camel cased method names for your steps. 🌈

You do not have to explain your scenarios or stories or steps in string, but you can if you need full control over what gets printed into console and HTML reports. 📊

• BDDfy is very extensible: the core barely has any logic in it and delegates all its responsibilities to the extensions all of which are configurable; e.g. if you don't like the reports it generates, you can write your custom reporter in a few lines of code. ⚡️


https://t.me/pgimg/161

[ Github ] : kutt.it/bddfy


#BDD #Testing #DotNet #CSharp
@ProgrammingTip
Browserless | Headless browser automation, without the hosting headaches 🆒

Browserless allows remote clients to connect and execute headless work, all inside of docker. It supports the standard, unforked Puppeteer and Playwright libraries, as well offering REST-based APIs for common actions like data collection, PDF generation and more.

Sample 🐞:
import puppeteer from "puppeteer";

// Try changing this! 👇
const URL = "https://t.me/s/ProgrammingTip";

const main = async () => {
const browser = await puppeteer.connect({
browserWSEndpoint: `wss://chrome.browserless.io`,
});
const page = await browser.newPage();
await page.goto(URL);

return page.screenshot();
}



[ GitHub ] : https://github.com/browserless/browserless
[ Website ] : https://www.browserless.io

〰️〰️〰️〰️〰️〰️
#E2E #Testing #Browserless #Docker
@ProgrammingTip
Please open Telegram to view this post
VIEW IN TELEGRAM