• Learn more about Java unit testing (JUnit + mock + code coverage)


    Preface Unit test is to write test code to detect specific, specific and fine-grained functions. Unit testing does not necessarily guarantee that the program functions are correct, let alone that the overall business is ready. Unit testing is not only used to ensure the correctness of the current code, but also to ensure the correctness […]

  • Dingxiangyuan open source interface management system


    API Mocker Post the project address first: dxy-f2e / API mocker With the development of web and the evolution of front-end and back-end separation, the interaction of web pages becomes more and more complex. In the process of project development, when the front and back end are developed in parallel, there are always various problems […]

  • Front-end automated testing (II)


    In the last article, we’ve already talked about it.JestIn this article, we will talk about how to use it in depth.Jest In testing, we will encounter many problems, such as how to test.Asynchronous logicHow?mockInterface data, etc. Through this article, you will be able to use Jest in the development of more than one edge, let’s […]

  • Front-end automated testing (3)


    Front-end automated testing (I)Front-end automated testing (II) Through the study of the first two articles, I believe you are right.JestThe core usage can be said to have been mastered. In this article, we use it in Vue.Jest 1. Integrating Jest in Vue We can go throughvueOfficially [email protected]/cliCreate a Vue project directly and install it before […]

  • Pre-research on mock platform of front-end and back-end separated development mode


    Original address Introduce Mock (simulation): is an object/interface that is external to the project or not easily accessible in project testing.Simulate with a virtual object/interfaceFor testing. background Front and back end separation Front and back ends are programmed only through asynchronous interfaces (AJAX/JSONP) Each front and back end has its own development process, build tools, […]

  • Design and Implementation of API Resource Isolation System


    (Horsehoneycomb technology original content, public ID: mfwtech) Part 1 Background Large transport business needs external supply chain to dock air ticket, train ticket, car rental, shuttle and other business. Most of the supplier’s data interface communicates through HTTP, HTTPS and other protocols. In order to ensure development progress and support multi-scenario support for integration testing, […]

  • Windows Local Installation Deployment Easy Mock


    In the development mode of front-end and back-end separation, if there is no data for the time being, the front-end can use analog data to deal with it for development convenience. At present, there are many platforms providing analog data, most of which are managed by Api, such as Yapi, soApi, epLinker, Easy-Mock and even […]

  • Xe-ajax encapsulated fetch asynchronous request function


    For the latest version, see Github. Click to view the historical version. Basic functions ajax ( options ) fetch ( url[, options] ) DoAll (iterable) concurrent multiple Setup (options) global parameter setting Interceptor interceptor How AbortController Cancels Requests Progress Upload/Download Progress Monitoring Convenient function doHead ( url[, options] ) doDelete ( url[, options] ) doJsonp […]

  • Extending the Mock Virtual Service of xe-ajax


    For the latest version, see Github. Click to view the historical version. MOCK Virtual Service Based on xe-ajax Docs https://xuliangzhan.github.io/vue-mock-template/ API Mock( defines, options ) Mock( path, method, response, options ) HEAD( path, response, options ) GET( path, response, options ) POST( path, response, options ) PUT( path, response, options ) DELETE( path, response, options […]

  • Vue uses xe-ajax


    npm install xe-ajax vxe-ajax –save Global installation through Vue. use () import Vue from ‘vue’ import XEAjax from ‘xe-ajax’ import VXEAjax from ‘vxe-ajax’ Vue.use(VXEAjax, XEAjax) Use <template> <ul> <li v-for=”(item, index) in list” :key=”index”>{{ item.name }}</li> </ul> </template> <script> export default { name: ‘App’, data: { return { list: [] } }, created () { […]

  • A Simple Analog Two-page Feedback Written by easy-mock


    A simple simulated two-page feedback written with easy-mock is not well structured because the back-end team is more traditional.Function: 10 pages, 2 pages, 12 records per page. Error codes will be returned when exceeding the parameter range. Easy template: { code: function({ _req }) { if (_req.query.page < 3) { return 0 }else{ return 41004 […]

  • Examples of mock testing with gomock


    In the development process, unit testing is often needed, but many times, unit testing needs to rely on some more complex preparatory work, such as the need to rely on the database environment, the need to rely on the network environment, unit testing has become a very troublesome thing. For example, we need to request […]