[Software Testing] Ultra-fine HttpRunner interface automation framework use cases, a guide to get through…

Table of Contents: Introduction Preface 1. Python programming from entry to proficiency 2. Practical implementation of interface automation projects 3. Web automation project actual combat 4. Practical implementation of App automation project 5. Resumes of first-tier manufacturers 6. Test and develop DevOps system 7. Commonly used automated testing tools 8. JMeter performance test 9. Summary […]

Deploy gitlab-runner

Article directory Preface 1. What is gitlab-runner? 2. Deploy gitlab-runner on Linux (CentOS) 3. Docker deploys gitlab-runner 4. Register Runner 5. Test Runner to run CI/CD task pipeline Summarize Foreword Before writing gitlab-runner, we first understand a concept CICD CICD is a software development practice that includes three concepts. CI stands for Continuous Integration, which […]

Mybatis SqlRunner execution process

Mybatis’ SqlRunner execution process SqlRunner exec = new SqlRunner(connection); Map<String, Object> row = exec.selectOne(“SELECT * FROM PRODUCT WHERE PRODUCTID = ?”, “FI-SW-01”); connection.close(); assertEquals(“FI-SW-01”, row.get(“PRODUCTID”)); Initialization process of TYPE_HANDLER_MAP in TypeHandlerRegistry class public TypeHandlerRegistry() { //Register the system’s built-in type processor in the constructor //The following is registered to the same handler for multiple types […]

[DEBUG] An error occurred when SpringBoot2+Mybatis was started: java.lang.IllegalStateException: Failed to execute CommandLineRunner

Specific error information java.lang.IllegalStateException: Failed to execute CommandLineRunner at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798) [spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:779) [spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:344) [spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1336) [spring-boot-2.5.0.jar:2.5.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1325) [spring-boot-2.5.0.jar:2.5.0] at com.hzj.HXBlogApplication.main(HXBlogApplication.java:21) [classes/:na] Caused by: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column ‘title’ from result set. Cause: java.lang.NumberFormatException: For input string: “SpringSecurity¦¥?¥?” at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92) ~[mybatis-spring-2.0.5.jar:2.0.5] at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) ~[mybatis-spring-2.0.5.jar:2.0.5] at […]

ruoyi-vue gitlab-runner ci/cd automated deployment

Article directory illustrate 1. Environment 2. Install Gitlab-Runner 3. Register runner Precautions 4. Install docker 5. Error handling 6. Backend.gitlab-ci.yml 7. Front-end.gitlab-ci.yml 8. Description Description Manual deployment is mostly inconvenient. It requires a series of operations such as restarting the service every time. After the automated deployment and configuration of gitlab-runner is completed, it can […]

Gitlab CI/CD+Runner+Docker implements automatic packaging and deployment of springboot projects

Article directory Preface 1. Gitlab Runner deployment 1. Obtain Runner registration token 2. Register Runner 3. Configure Runner 2. Configure GitLab CI 3. Run the pipeline 4. Use scheduled scripts for backup & deployment Reference URL Summarize Foreword The software and versions used in this article are as follows: Gitlab: 14.6.1; Gitlab-Runner: 16.3.1 This article […]

gitlab Runner installation and deployment

1. Install gitlab Runner This demonstration is for centos 7.5 environment. Please adjust according to your own environment. 1)Online installation #Install official image source [root@k8s-node02 ~]# curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash #yum install gitlab Runner [root@k8s-node02 ~]# yum install gitlab-runner -y 2)Offline installation gitlab Runner download address: https://packages.gitlab.com/runner/gitlab-runner Server creation installation package location [root@k8s-node02 […]

httprunner environment variables

Foreword Mylastarticletalkedaboutthebasicintroductionofhttprunner.Thisarticlemainlyintroducestheenvironmentvariablesinhttprunner. Generallyspeaking,duringthedevelopmentprocessofactualapplications,theapplicationswillhavedifferentrunningenvironments,usuallythefollowingenvironments: localdevelopmentenvironment testenvironment ProductionEnvironment Indifferentenvironments,wemayusedifferentconfigurationssuchasdatabasesoremailsendingdrivers.Inthiscase,weneedtouse.envfilestomakedifferentsettingsfordifferentoperatingenvironments. Environmentvariables Inautomatedtesting,itissometimesnecessarytouseenvironmentvariablestoachievecertainspecificpurposes.Commonscenariosinclude: Switchtestenvironment Switchtestconfiguration Storingsensitivedata(fromaninformationsecurityperspective) InWindowssystems,usethesetcommandtosetenvironmentvariablesandvalues.Next,setthefollowingvariables host=http://127.0.0.1:8000Setthehostvaluetoswitchtherunningenvironmentwithoneclick user=testSetloginaccountandpassword,switchaccounttotest psw=123456Setloginaccountandpassword,switchaccountstotest Opencmdandusethesetkey=valueformattosetenvironmentvariables(linuxusestheexportcommand) C:\Users\dell>sethost=http://127.0.0.1:8000 C:\Users\dell>setname=test C:\Users\dell>setpassword=123456 Toviewthevalueofanenvironmentvariable,usesetkeynametoviewthecorrespondingvalue. C:\Users\dell>sethost host=http://127.0.0.1:8000 C:\Users\dell>setname name=test C:\Users\dell>setpassword password=123456 InWindowssystems,%var%isusedtoreferencevariablesonthecommandline. C:\Users\dell>echoaccount:%name% Account:test Toreferencetheenvironmentvariablejustsetinpython,firstimporttheosmoduleandobtainitusingtheos.environmethod(environisadictdefinedinos.pyenviron={}) C:\Users\dell>python Python3.6.0(v3.6.0:41df79263a11,Dec232016,08:06:12)[MSCv.190064bit(AMD64)]onwin32 Type”help”,”copyright”,”credits”or”license”formoreinformation. >>>importos >>>os.environ.get(‘host’) ‘http://127.0.0.1:8000’ >>>os.environ.get(‘name’) ‘test’ >>>os.environ.get(‘password’) ‘123456’ >>> Allmodificationstoenvironmentvariablesunderthecmdcommandlineareonlyeffectiveforthecurrentwindowandarenotpermanentmodifications.Thatistosay,whenthiscmdcommandlinewindowisclosed,itwillnolongerwork.Topermanentlymodifyenvironmentvariables,youcansetthesystem’senvironmentvariablesthroughMyComputer→Properties→Advanced. .envfilesetsenvironmentvariables Theenvironmentvariablessetincmdcannotbestored,soyouneedtocreatea.envfiletostoretheenvironmentvariables.Thestorageusesthename=valueformat:Winodwscannotdirectlycreate.envfilesandwillpromptthatthefilenamecannotbeempty.Here,usepycharmtocreateanew.envfile.(Oryoucreateanewfilethathasbeenusedin1.envandrenameitinthecmdwindowrename1.env.env) #.env host=http://127.0.0.1:8000 name=test password=123456 Next,writeanENVfunctionindebugtalk.pytoreadenvironmentvariablesanddirectlyreferenceenvironmentvariablesinYAML/JSONscripts.(Thefunctionenviron(ENVforshort)isbuilt-ininHttpRunner2.xversion) #debugtalk.py importos defENV(keyname): ”’ Getthevaluecorrespondingtotheenvironmentkeyname […]

(16) mmdetection source code interpretation: BasedRunner

Directory 1. BasedRunner source code 2. Properties of the BasedRunner class 3. Methods of the BasedRunner class 3.1 Read-only properties and abstract methods 3.2 Weight saving and loading methods 3.3 Hook registration and calling 1. BasedRunner source code class BaseRunner(metaclass=ABCMeta): def __init__(self, model, batch_processor=None, optimizer=None, work_dir=None, logger=None, meta=None, max_iters=None, max_epochs=None): if batch_processor is not None: […]