preface

With the gradual maturity of distributed technology stack, in recent years, more and more systems and fields of micro-service architecture design have been adopted in the industry, including finance, e-commerce, live broadcasting, logistics, marketing, procurement, manufacturing, etc. There are Internet fields and traditional fields. The blogger here has sorted out a variety of materials including but not limited to: JAVA foundation and advanced classes, Spring, Spring Boot, Spring MVC, MyBatis, MySQL, JVM and so on, free to share with you into the group partners

To the chase

How do we eliminate determinism from testing?

Nondeterministic tests (NDT) are basically unreliable tests. So, sometimes they might pass, and obviously sometimes they might fail. When they fail, they re-run through.

Some ways to remove uncertainty from tests are as follows:

1, the isolation

2, asynchronous

3. Remote services

4, isolation

5, time,

6. Resource leakage

What’s the difference between a Mock or a Stub?

The stub

· A virtual object to help run tests.

· Provide fixed behavior under certain conditions that can be hard-coded.

· Stub is never tested for any other behavior.

For example, for an empty stack, you can create a stub that returns true only for the empty () method. Therefore, it doesn’t matter if there are elements in the stack.

Laugh at

· A virtual object in which some properties are initially set.

· The behavior of this object depends on the set property.

· You can also test the behavior of objects.

For example, with the Customer object, you can simulate it by setting the name and age. You can set age to 12 and then test the isAdult () method, which will return true if age is greater than 18. Therefore, your Mock Customer object applies to the specified conditions.

How much do you know about Mike Cohn’s Testing pyramid?

Mike Cohn provides a model called Test Pyramid. This describes the types of automated tests required for software development.



According to the pyramid, level 1 should have the highest number of tests. At the service layer, the number of tests should be smaller than at the unit test level, but larger than at the end-to-end level.

What is the purpose of Docker?

Docker provides a container environment that can be used to host any application. Here, the software application is tightly packaged with the dependencies that support it.

Therefore, this packaged product is called a Container, because it is done by Docker, so it is called a Docker Container!

What is canary Release?

Canary Releasing is a technology that reduces the risk of introducing new software versions into production. This is done by slowly rolling out the changes to a small number of users, then publishing them to the entire infrastructure, making them available to everyone.

What is Continuous integration (CI)?

Continuous integration (CI) is the process of automatically building and testing code every time a team member commits a version-control change. This encourages developers to share code and unit tests by merging changes into a shared version control repository after each small task is complete.

What is continuous monitoring?

Continuous monitoring monitors everything from front-end performance metrics in the browser, to application performance, to host virtualization infrastructure metrics.

What is the role of the architect in the microservices architecture?

Architects in microservices architecture play the following roles:

· Determine the layout of the entire software system.

· Help determine partitioning of components. Therefore, they ensure that components are glued to each other, but not tightly coupled.

· Write code with developers to understand the challenges of daily life.

· Advise the team developing microservices on certain tools and technologies.

· Provide technical governance so that the technical development team can follow microservices principles.

Can we create state machines with microservices?

We know that each microservice with its own database is a independently deployable unit of program, which in turn allows us to create a state machine. Therefore, we can specify different states and events for specific microservices.

For example, we can define the Order microservice. Orders can have different states. Transitions to Order state can be isolated events within the Order microservice.

What is reactive scaling in microservices?

Reactive Extensions are also known as Rx. This is a design approach where we collect the results by calling multiple services, and then compile the composite response. These calls can be synchronous or asynchronous, blocking or non-blocking. Rx is a very popular tool in distributed systems, as opposed to traditional processes.

At the end

Blogger here to give you a welfare ~

The following are some data screenshots (all data have been integrated into a document, compressed PDF packaging processing).