Tag:test run

  • Unit test of [Java Web] springboot controller

    Time:2020-12-4

    Dependency Junit5 needs to be added: <!– Junit dependency –> <dependency> <groupId> org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> <version>5.1.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-launcher</artifactId> <version> 1.1.0 </version> <scope>test</scope> </dependency> <!– Junit dependency –> Explanation:JUnit platform is a platform that provides running (testing framework) environment, JUnit Jupiter is a new junit5 (subproject provides a test engine for running Jupiter based […]

  • Starting from 0, build the script of hugin to regularly monitor the gold price

    Time:2020-11-15

    The overall process is as follows: 1. Post agent SchedulechoiceEvery 5h, stands for automatic operation every 5 hoursReceivers Choose to analyze the price of goldJavaScriptAgent { “post_url”: “https://www.g-banker.com/price/query”, “expected_receive_period_in_days”: “1”, “content_type”: “json”, “method”: “post”, “payload”: { “queryFlag”: “3” }, “headers”: {}, “emit_events”: “true”, “no_merge”: “false”, “output_mode”: “clean” } The results are as follows: Because this […]

  • Exploration and practice of unit testing in nutui 3.0

    Time:2020-8-19

    As we all know, unit test function is an essential part of component library development, which is responsible for checking and verifying to ensure the rationality and standardization of components. This paper mainly talks about the exploration and practice of unit test in nutui component library. We will elaborate from three aspects: how to write […]

  • Create spring boot microservice project

    Time:2019-12-5

    Create a microservice project HelloWorld for testing Create project Write service code @RestController public class HelloWorld { @RequestMapping(“/hello”) public String Hello(@RequestParam String name){ Return “Hello! “+ name +”, this is a microservice. “; } } Edit the configuration file application.properties: spring.application.name=spring-cloud-provider-01 server.port=9000 test run Source code GitHub warehouse: https://github.com/sunweisheng/spring-cloud-example