Hibernate + Springboot implements the @Filter filter to automatically add conditional filtering. How to implement sprinboot multi-tenancy (shared table, by adding tenant_id)

Hibernate + Springboot implements @Filter filter to automatically add conditional filtering After three days and three nights of torture, I finally solved this requirement. First of all, this requirement is generally implemented through annotations. So the first step is to write an annotation by hand: @Target({<!– –>ElementType.PARAMETER, ElementType.METHOD})//The target location for annotation placement, METHOD can […]

[Key Points] Selenium + Nightwatch automated test environment construction

Start building 1. Create project Let’s find a place to create a new directory, name it “my-test-toolkit”, and then use the terminal in the directory to run npm init -y to generate the project configuration file< strong>package.json. 2. Installation tools Then we will install Selenium and Nightwatch. Install selenium-standalone: npm install selenium-standalone –save-dev Install Nightwatch: […]

Java + Selenium + Appium automated testing

1. Start the test machine or Android emulator (Genymotion is commonly known as the fastest emulator in the world, you can install it on Baidu) 2. Start Appium (Appium environment installation can be done by Baidu yourself) 3. Install the application on Genymotion. As shown below, I installed a small computer application with the package […]

Launcher3 custom desktop application [Android13 version]

Article directory summary Change default layout Dynamically add apps to the home screen in code summary Summary Launcher3 project address: AOSP source code/packages/apps/Launcher3 Launcher3 customizes desktop applications. I currently have two methods in practice: Change the default layout file and specify which apps to add to the home screen Dynamically add apps to the home […]

Python interface automated construction process, including request request encapsulation

Some thoughts at the beginning Interface test automation benefits The obvious benefit is freeing your hands. Can automatically execute a large number of test cases in a short time Improve test coverage by changing test data in a parameterized and data-driven manner Quick feedback on test execution results and reports Processes that support continuous integration […]

Writing custom controls in Qt – Halo Clock

1. Preface In the previous article, I wrote a high imitation of the halo calendar for the WIN10 system. This time I will draw a halo clock, which is also the effect seen on some web pages. The hours, minutes and seconds are drawn in the form of a progress bar, and This progress bar […]

Writing custom controls in Qt – Halo Calendar

1. Preface The update and iteration speed of the operating system is very fast. Basically, a new version will be released every three to five years. The WIN10 operating system is still a relatively successful system. It is said that the market share is getting larger and larger. XP’s share is already very small, and […]

clang-format and cppcheck automation scripts

Ubuntu installs clang-format and cppcheck# code format automatic adjustment & amp;check clang-format format adjustment Install clang-format: sudo apt install clang-format Generate .clang-format file: clang-format -style=google -dump-config > ~/.clang-format Modify the maximum width of each row, ColumnLimit, to 120. The following is the modified code, which can be saved to the ~/.clang-format file. — Language: Cpp […]

Selenium automated testing framework

1.SeleniumOverview 1.1Whatisaframework? Aframeworkisaframe-referringtoitsrestrictivenature,andashelf-referringtoitssupportingnature.It’sabasicconcept Structuresareusedtosolveordealwithcomplexproblems. Aframeworkisareusabledesignoftheentireorpartofasystem,representedbyasetofabstractcomponentsandmethodsofinteractionbetweencomponentinstances;anotherdefinitionItisbelievedthataframeworkisanapplicationskeletonthatcanbecustomizedbyapplicationdevelopers.Theformerisdefinedfromanapplicationperspectivewhilethelatterisdefinedfromapurposeperspective. Aframeworkisactuallyasemi-finishedproductofacertainapplication,asetofcomponentsforyoutochooseandusetocompleteyourownsystem.Simplyput,use Othershavesetthestage,andyoucometoperform. 1.2Whyuseframeworks? 1)It’stoocomplicatedtoimplementityourselffromscratch 2)Usingtheframeworkcanfocusmoreonbusinesslogicandspeedupdevelopment 3)Theuseofframeworkscanhandlemoredetailedissues 4)Largenumberofusers,goodstabilityandscalability 1.3Seleniumworkingprinciple 2.SeleniumAPIbasics 1.Prerequisiteoperations (1)Importlibrary fromseleniumimportwebdriver (2)Createabrowserobject driver=webdriver.Chrome()#CreatebrowserobjectGoogleChrome driver.get(‘https://www.baidu.com/’)#VisitURLBaidu 2.Method Weneedtousedir()toviewthemethod print(dir(driver)) (1)Adjustthebrowsersize driver.maximize_window()#Maximizethewindow print(driver.get_window_size())#Getbrowsersize{height’:1020,width’:945} driver.set_window_size(width=1200’,height=1000’)#Setbrowsersize (2)Adjustthepositionofthebrowser print(driver.get_window_position())#Getthebrowserposition{‘x’:10,’y’:10} print(driver.set_window_position(100,100))#Setbrowserposition (3)Gettheurlofthecurrentpage print(driver.current_url)#https://www.baidu.com/ (4)Getthetitleofthecurrentpage print(driver.title)#Baidu,youwillknow (5)Refreshthepage driver.refresh() (6)Returntopreviouspage/nextpage driver.back()#Previouspage driver.forward()#Nextpage (7)Savepictures #methodone: data=driver.get_screenshot_as_png()withopen(111.jpg’,wb’)asf:f.write(data) #Method2: driver.get_screenshot_as_file(222.jpg’) (8)Viewwebpagesourcecode print(driver.page_source) (9)Closethewebpage driver.close()#Closethecurrentpage driver.quit()#Closeallpages 3.Elementpositioning #Method1:driver.find_element_by_xxx(value) #Method2:driver.find_element(By.xxx,value) #1.id input=driver.find_element_by_id(‘kw’) input.send_keys(12306) […]