I Am Here For You

Hello my beautiful people. My name is jalesia but you can call me J. My reason for starting this blog is to help people find themselves. Through my experiences I want to Inspire and hopefully shine…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Break Your App Like a Server

Real-Time Phoenix — by Stephen Bussey (59 / 106)

👈 Break Your App Like a User | TOC | Automate Acceptance Tests With Hound 👉

Errors do not always happen from user initiated actions — different processes and tools can fail on the server. Your application may experience network disconnections between servers, database slowness or downtime, and crashed processes due to bugs or a large amount of work. It’s nearly impossible to consider everything that can go wrong in an application, so you often won’t realize that there is a problem with failure handling until it’s too late. You can simulate many types of problems locally and in staging environments before experiencing them in production.

In this section, we’ll test what happens to our application during database downtime and when different processes crash on the server. We’ll utilize the observer tool that ships with Erlang/OTP to view our application’s supervision tree. We will kill various processes to ensure that our application doesn’t reach an incorrect state. A good rule of thumb is to make sure that any custom GenServers, custom Supervisors, and your Ecto Repo can be killed without your application crashing. We’ll be performing manual acceptance tests throughout this section. However, our tests will be doing things outside of what a normal user could do.

A database outage is a serious issue. The database of an application is often the source of truth, so any operation that requires strong consistency should fail. Operations that don’t perform updates or don’t require strong consistency may still work in the event of a database outage.

This type of test is pretty advanced for a normal QA process, but is useful when you are testing flows that involve money or other important resources. It’s good to know how your application will respond when a database disconnects, although hopefully you won’t see that happen very frequently.

Define the test
A shopper is initially connected to the store, waiting for a shoe to release. The application database restarts during this time. The shopper should be able to reload the page without error but should not see a shoe release during this time. From an application admin perspective, the application will disallow the release of a sneaker.
The server should serve pages during this time, but the server will not work if…

Add a comment

Related posts:

Globetrotting

Someone who had travelled the world was asked to name the most interesting things he had seen on his voyages. The traveller replied, ‘Sorry I can’t tell you until I collect the photos I took from the…

Create custom address attribute programmatically Magento 2

In this article we will explore the necessary requirements to create a custom address attribute which will be used in customer addresses. The creation of these is very similar to how you would create…

On North Korea 20180306

Biggest news this morning is that North and South Korean leaders agree to direct talks, possibly as early as next month. This is just the third time that leaders from both Korea hold direct talk…