ApplicationRunner, InitializingBean, @PostConstruct execution sequence

Overview There may be scenarios in development where you need to execute something when the container starts. For example, reading configuration files, database connections, etc. SpringBoot provides us with two interfaces to help us achieve this requirement. The two startup loading interfaces are: CommandLineRunner and ApplicationRunner. Spring provides the interface InitializingBean, and jdk provides @PostConstruct […]

A brief discussion on how to carry out interface testing with Pytest+HttpRunner!

There are various methods and techniques for software testing, and they can be classified from different perspectives. Among them, according to the software life cycle, the testing process can be divided into four stages for different test objects and goals: unit testing, integration testing, system testing and acceptance testing. This article focuses on how to […]

[Write UI automation test set]Appium+Python+Unittest+HTMLRunner?

Introduction Get AppPackage and AppActivity Tools for positioning UI controls Script structure PageObject hierarchical management HTMLTestRunner generates test reports Start appium server service Execute script in python file mode to generate test report Download and install Download the App that requires automated testing and install it on your phone Get AppPackage and AppActivity method one […]

httprunner environment variable

Foreword My last article talked about the basic introduction of httprunner. This article mainly introduces the environment variables in httprunner. Generally speaking, during the development process of actual applications, the applications will have different running environments, usually the following environments: local development environment test environment Production Environment In different environments, we may use different configurations […]

httprunner2 uses

Installation: pip install httprunner==2.5.9 Build a scaffolding: hrun –startproject demo Scaffolding frame structure: Run use cases (suites, use cases, and interfaces can all be run, generally run the suite layer, organize use cases through the suite layer, and organize interfaces at the use case layer): hrun api/course_list.yml Report View: Interface layer writing: name: course list […]

ApplicationRunner interface and CommandLineRunner interface in [SpringBoot]

1. ApplicationRunner interface Usage: Type: Interface Method: Only one run method is defined Usage scenario: When the springBoot project starts, if you want to execute a certain piece of code directly after startup, you can use the ApplicationRunner interface and implement the run(ApplicationArguments args) method in the interface. Write yourself in the method code logic. […]

Python interface automated testing – detailed use of unittest framework suite and runner

test suite Test suite, understood as a set of test cases A series of test cases, or test suites, understood as a collection of test cases and a collection of test suites When running the test suite, run all the test cases added inside test runner test runner Components for executing and outputting results Basic […]

Python interface automated testing – detailed use of unittest framework suite and runner

test suite Test suite, understood as a set of test cases A series of test cases, or test suites, understood as a collection of test cases and a collection of test suites When running the test suite, run all the test cases added inside test runner test runner Components for execution and output of results […]