Tag:Assertion

  • Template variable replacement in written examination

    Time:2021-7-19

    JS regular short, assertions do not match, matching can be captured, capture can be referenced, global all come once. problem Given the string containing n variables, it is required to replace the variables with corresponding values, such as $no = 5 and $title =’Jack ‘ <div> <p> {$no}</p> <p> {$title}</p> </div> thinking Define regular lookup$String […]

  • Seed of webpack + angular (Part 2)

    Time:2021-7-16

    Seed of webpack + angular (Part one)The construction, production and hot compilation display of the project are introduced. introduce Here is mainly about testing. Many companies are doing agile development. There are many methods for agile development, but no matter which method is adopted, testing is necessary. Verification of code, verification of function, timely feedback […]

  • Laravel Test Driven Development — reverse unit test

    Time:2021-6-27

    Negative CRUD Unit Testing in Laravel5 This is a translationhttps://medium.com/@jsdecena/… AsCRUD Unit Testing in Laravel5In the second part of this article, we will discuss reverse testing in the future. The fighter forward test we wrote in the last article; Assertion cancreate、update、showperhapsdelete CarouselModel objects. Now let’s conduct orientation test to see how we can control the […]

  • A summary of four types of conversion in golang

    Time:2021-5-31

    A series of articles: Implementation principle of golang reflect A summary of four types of conversion in golang Go type conversion There are four types of go conversion: assertion, coercion, explicit and implicit. Generally speaking, type conversion refers to assertion. Coercion is not used in daily life. Display is a basic type conversion. It is […]

  • Four useful functions in es2018

    Time:2021-5-6

    The es2018 specification introduces four new features. These functions include asynchronous iteration, rest / spread property, and so on,Promise.prototype.finally()And regular expression improvement. This question will help you understand how these es2018 functions work and how to use them. Asynchronous iteration Asynchronous iteration is one of the less discussed functions. Although there are many discussions about […]

  • Testing MVC web contractor with @ webmvctest (2)

    Time:2021-4-25

    original texthttps://reflectoring.io/sprin…Translator: Zhu KunrongIt takes about 10 minutes to read 1. Check and match the HTTP request Verifying that a controller listens to a specific HTTP request is straightforward. We only need to call the perform() method of mockmvc and provide the URL to be tested mockMvc.perform(post(“/forums/42/register”) .contentType(“application/json”)) .andExpect(status().isOk()); Not only does it verify that […]

  • The use of CSS selector

    Time:2021-4-24

    preface I’ve been writing data verification this week. During the foreground unit test, sometimes layer V doesn’t render the data, so I need to let it render manually. it(‘should create’, () => //The following assertion ensures that no exception occurs during the initialization of the component expect(component).toBeTruthy(); //Simulation of production environment background asynchronous return data […]

  • Automated testing series (2) | API testing

    Time:2021-4-12

    In the lastAutomatic test series (1)This paper mainly focuses on the concept of API testing and the practice of API testing in Choerodon. API (Application Programming Interface) testing is a kind of software testing, which can perform verification directly at the API level. It is part of integration testing, which determines whether the API meets […]

  • Springboot unit test

    Time:2021-3-31

    See a very good article about spring boot unit testing, here to turn, original address: spring boot dry goods series: (12) spring boot unit testing 1、 Preface This time, I will introduce the integrated use of unit testing in spring boot. This article will introduce the following four points to basically meet the daily needs […]

  • Wonderful problems on codewars (2)

    Time:2021-3-24

    After work, I looked at a problem on codeworks. The topic is as follows Write a regular, verify the password, ensure the following points,0. The number of digits is more than six1. It must contain lowercase letters2. It must contain capital letters3. Must contain numbers Well, I haven’t worked it out for a long time. […]

  • [go] gocron source code reading – empty interface type interface {}

    Time:2021-3-3

    The action in gocron source code is an empty interface type action interface {}, which can pass any type in. Here, a function is passed in command := cli.Command{ Name: “web”, Usage: “run web server”, Action: runWeb, Flags: flags, }   An interface is a contract. As long as any type implements the method in […]

  • Let you thoroughly understand regular expressions, no longer copy

    Time:2021-2-13

    Regular expressions are used to match a string. The word “regular expression” is too long. We usually use its abbreviation “regex” or “regexp”. Regular expressions can be used to replace text in a string, validate a form, extract a string from a string based on pattern matching, and so on. From now on, say goodbye […]