Go simulates Kubernetes Client for unit test

summary Writing unit tests is always painful for developers. The main reason for this is that, generally, unit tests (functional unit tests) should not use any physical components / running instances of the application. For example, unit tests of API SDK should not have any running API instances. That's why it's crucial to simulate applica ...

Posted by xoligy on Thu, 16 Dec 2021 14:31:08 +0100

Troubleshooting of Apache HttpClient connection pool leakage

Troubleshooting of Apache HttpClient connection pool leakage Problem background The main business of the business system is a data aggregation management platform, in which one function of the system is to synchronize all resources (large synchronization for short) The service synchronization data request data tool is Feign adapted to Apach ...

Posted by bala_god on Thu, 16 Dec 2021 05:11:44 +0100

Automatic deserialization of fluent Jason, 2021 gold, silver and four sides trial season

What will you learn How to parse json objects in fluentHow to generate code using the auto generation toolHow to test your data Start json deserialization Step 1: create mock data In the actual development process, we may modify some of the previous code. When our code is complex and large enough, we need to use unit tests to ensure that th ...

Posted by monkeytooth on Tue, 14 Dec 2021 19:26:48 +0100

Gao fushuai in unit testing, Pytest framework, hand-in-hand teaching, high-order usage practice

1, Front back approach in xunit style 1. Pre post method of function use case Use cases are defined in the form of functions in the module, which can be defined through setup_function and teardown_function to define the pre and post methods of function use cases. The use cases are as follows: def setup_function(function): print("Functi ...

Posted by jordanwb on Fri, 03 Dec 2021 17:33:48 +0100

How to do automated testing if you can't program

preface Testers who can test and understand programming are still scarce, and most organizations may not invest in this aspect. Therefore, let ordinary test engineers simply learn to carry out automated testing, which is still in market demand. Before, I was confused that ordinary test engineers could not deeply participate in the case prep ...

Posted by dpsd on Wed, 10 Nov 2021 19:32:40 +0100

mockito for java unit testing

Learn mockito 1: Introduction to mockito Mockito is an excellent mock framework for unit testing. When "mock" is mentioned in software development, it is usually understood as a simulation object. So mockito is to simulate the object and then conduct decoupling test. Mock is to make a fake object. All calls to the methods in this ob ...

Posted by MoldRat on Sat, 06 Nov 2021 05:51:38 +0100

Python test framework pytest (12) Hooks function - other Hooks functions

catalogue 1,pytest_report_teststatus custom test results 2,pytest_ generate_ Generate test cases parameterized by tests   3. More Hooks functions 1,pytest_report_teststatus custom test results pytest_ report_ The teststatus (report, config) hook function returns the result category, short letters and detailed words of the status repo ...

Posted by kodlcan on Fri, 22 Oct 2021 07:37:02 +0200

Introduction and use of MyBatis

1. Official documents of mybatis Mybatis – MyBatis 3 | getting startedhttps://mybatis.org/mybatis-3/zh/getting-started.html 2. Why do you need Mybatis Simplify the traditional JDBC code and realize automatic mappingSimple and easy to useMost companies use itadvantage:Easy to learn: itself is small and simple. There is no third-party de ...

Posted by mbrown on Mon, 11 Oct 2021 23:32:58 +0200

Richter replacement principle of 23 design modes

Richter substitution principle Thinking and explanation of inheritance in OO 1. Inheritance contains a layer of meaning: all implemented methods in the parent class are actually setting specifications and contracts. Although it does not force all subclasses to follow these contracts, if subclasses arbitrarily modify these implemented methods, ...

Posted by blacklotus on Mon, 27 Sep 2021 13:27:58 +0200

Implementing TS unit testing using Mocha testing framework

1. Background   The current project uses ts as the development language. If you want to introduce unit testing, choose Mocha, one of the mainstream frameworks after Baidu to try. 2. Mocha introduction mocha is a unit test framework of JavaScript, which can run in both browser environment and Node.js environment. With mocha, we just need ...

Posted by vchris on Fri, 17 Sep 2021 13:11:30 +0200