In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
The nebula test Horn plug-in uses script configuration to scan and insert the syntax automatically, and the plug-in tools provided by the nebula are needed in the whole plug-in process. Through the integration with CI, the nebula plug-in module is called by jenkins before CI compilation for necessary data filling, and the corresponding project plug-in script is generated, that is, the project plug-in can be inserted and compiled through the nebula plug-in.
Automatically create projects and code instrumentation through nebula plug-in scripts. Decompress the plug-in package provided by the nebula
The instrumentation tool provided for nebula testing in the windows environment is the javaForWindows toolkit; just put the javaForWindows in the appropriate directory and extract it. (LINUX uses the LINUX plug-in package). (log on to the nebula website www.teststars.cc offline Enterprise Test Center for free trial)
two。 Modify script configuration
The entire compilation of the nebula test is carried out through the script ComplierPath.xml configuration file. In ComplierPath.xml, users need to configure the server address, user name, project name, version name, and code path of TTserver. If you need to filter the code that does not need to be plugged in, you can also filter through this configuration. Populate the data of the general template through jenkins to generate the corresponding script needed for this instrumentation and compilation project.
Configuration parameters description:
Before 127.0.0.1user uses this user name It is recommended that the user name has no other login client operations user0 general default 0 general default 0 (note: project_path and class_path paths cannot be empty) general default 1 general default 0 general default j2eeproj asdasdada_RR is generally empty Ver2 TTPro1 J:\ sushe\ src J:\ sushe\ build\ classes GBK general default Recognize D:\ moxi\ target\ classes (Note: do not want to insert multiple paths Write more than one filterPath) generally do not fill in 3. The plug-in runs for code analysis and instrumentation
The TT plug-in can be started with the Jenkins command. For example, Windows uses the cmd command to select to the root directory where the plug-in is located, and run autoCompiler.jar to compile (remember to compile under the javaForWindows directory when compiling)
Command:\ jre\ bin\ java.exe-jar autoCompile.jar-c D:\ J2EE\ javaForWindows
Note: the parameter after-c is the directory of the ComplierPath.xml file
After the command takes effect, the code is analyzed and inserted automatically and printed in the cmd window.
Note: 0 if you choose the startup mode of 1:
.\ jre\ bin\ java.exe-jar autpCompile.jar-c plug-in path ComplierPath.xml absolute path
4. After the project static data is loaded and installed successfully, you can see the static data generated by the analysis by logging in to the client and selecting the project we plugged in to load the version static data.
5. Replace the source code path with nebula instrumentation code
Since you need to run the code application after nebula instrumentation to generate and collect data during testing, you need to modify the compiled source code path and replace the directory through Jenkins script. The code after nebula instrumentation will generate a src-instru directory under the same layer of the code path configured by the script, and the src-instru directory is the compiled source code.)
Specific operation: first rename the unplugged java directory under the source directory to pre_java, and then rename the src-instru directory generated by compilation and instrumentation to java.
6. Add the nebula dependency library to the project and compile the Maven project pom.xml modification to add the dependency library
Because the code after the nebula instrumentation is used, that is, the two dependent libraries provided by the nebula need to be introduced in the compilation process, the Maven project can be introduced by modifying pom.xml.
Automatically modify the project's pom.xml file through jenkins to introduce TT's dependent libraries:
Method is added between the two, and the code is as follows:
SystemPath needs to fill in com.zoaJavaParser-MQ1.0system/D:/J2EE/client/MQ/JavaParser-J2EE.jar com.zoa jeromq 1.0system/D:/J2EE/client/MQ/ jeromq-0.3.0-SNAPSHOT.jar according to the absolute path of JavaParser-j2ee.jar and jeromq-0.3.0-SNAPSHOT.jar
You can package and publish after the modification of the pom file is completed.
Execute the mvn clean package command in the directory of the program under test
Traditional J2EE or Android projects
Use jenkins to introduce JavaParser-j2ee.jar and jeromq-0.3.0-SNAPSHOT.jar into the compilation project. Note: group J2EE and Android projects are required here. For example, Android projects need to put two dependent packages into APK. If it is a J2EE project, please remove the dependency package in the final generated war package or jar package, because the J2EE project will eventually be used with agent, and the dependency will be included in agent.
Packaging is completed, in order to make the function coverage visual view part of the code display normally, you need to manually modify the source code path: right-click the version, click to modify the source code path, and select the pre_java directory.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.