Testing

Drill is a HTTP load testing application written in Rust. The main goal for this project is to build a really lightweight tool as alternative to other that require JVM and other stuff.

You can write benchmark files, in YAML format, describing all the stuff you want to test.

It was inspired by Ansible syntax because it is really easy to use and extend.

Writing your load test scenario in yaml could be simple as

All you need to do is installing drill by 2 ways

cargo install drill
drill --benchmark benchmark.yml --stats

or directly from code

git clone…

Today is a cool day in my local town. A little rain but the weather is cool and I feel great. I know that I should feel great all the time , because the meaning of life and also we should enjoy every moment of our life but in the end someday we just feel great. :D

In the past I used to live with my parents. I’m not complaining about how it’s bad when live with parents when you’re a grownup man, because everything has pros and cons but I think in the end, if you wanna grow then…


Photo by Tuyen Vo on Unsplash

When using REST API in front-end recently, I met an issue when front-end keep throwing error

network error when attempting to fetch resource.

this issue turns out to be a problem due to CORS.

Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins  (domain, scheme, or port) other than its own from which a browser  should permit loading of resources. CORS also relies on a mechanism by  which browsers make a "preflight" request to the server hosting the  cross-origin resource, in order to check that the server will…

Learn everyday

Photo by Jimmy Dean on Unsplash

So while I’m learning Haskell, I would try to write a simple encoding function then decode it back. Then add some more examples in other languages such as Scala, or Python.

Haskell example — encoding

Some explanations:

  • ord function show us the offset of the character in Unicode
  • chr function convert from offset to actually character
  • The function take an offset integer, and the needed encode string to convert

Example running

ghci> encode 3 "I love you" 
"L#oryh#|rx"

Scala example

We define the string we want to encode, then we iterate each character in the string and convert to…


Functional Programming

Photo by Camylla Battani on Unsplash

Higher order functions infer a way of programming that we can pass function to another function as parameter, or even return function from another function. It gives us a very flexible way of tackling problems. In this post we will go through how to apply higher order functions in several programming languages.

First, let’s see how Haskell, a purely functional programming apply higher order functions. Below is a example for finding the maximum number from the list using recursion. In the function, the return of this function is its own function.

Haskell example with maxList

Here we define the input…


Photo by Kristýna Jírová on Unsplash

You are testing a lot of features and it run so slow. How can you run tests faster and utilize the multiple cores of your computer? One way to start implement your tests in a concurrent way. Below are the examples for Python language using pytest-asyncio library.

Note: You can checkout this guide to learn more about asynchronous in Python.

https://gist.github.com/cuongld2/d1ab810c776e6ff2e5fa788c86f4dfd8

We will make http request to github api and dev.to in asynchronous way. What does it mean? It means the call to http request and github api will be called right away (without waiting for result to return). …


Photo by Guillermo Ferla on Unsplash

Concurrency means we’re doing many things at the same time. For example, we can listen to music while running.

Parallelism we’re doing many things simultaneously. For example, we cannot run while tying our shoes.

How it relates to software programming.

Computer supports parallelism by using OS threads. If your PC is 3 core PCs, that means there are maximum 6 threads that can be run parallels. Some typical examples related to testing to demonstrate difference between them:

  • When you’re doing load testing for your API services, to know how your system reacts when there are about 1 thousand concurrent users…

Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store