In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Micro-service is a popular development framework in Devops scenario, which is widely used in large-scale projects. It divides a large single application and service into dozens of supporting micro-services, deploys independently and isolates each other, deals with functional bottlenecks by expanding components, and can use computing resources more effectively than traditional applications. Micro-services do not need to care about each other's model, it flows data through pre-agreed interfaces, so that the business can respond to market changes efficiently. However, an obvious appearance of micro-services is that with the increase of services, the traditional testing mode is greatly restricted and can not be carried out effectively, threatening the overall system quality. All the white box acquisition tools of J2EE code layer can not distinguish the corresponding relationship between coverage and specific functions, and can only collect a stage of total coverage in background mode, which can not meet the requirements of fault location, in-depth test analysis and agile publishing algorithm under Devops.
Nebula testing (www.teststars.cc) publishes a precision testing solution for distributed micro-services, which is the only test platform in the market that can perform code white box level analysis and request distributed tracking across multiple servers in complex distributed systems. The penetration module in the product can support a variety of mainstream micro-service communication architectures. For example, httpclient, springcloud micro-service architecture, Ali dubbo micro-service architecture, and message queuing are used to logically separate and reconstruct multiple sets of code across multiple services in concurrent access scenarios. After the code that implements the business logic is discretized through microservices at the development level, the entire code execution view can be reversed in the test phase. The concept of threading (Threadingtest) in precision testing adds a third layer of meaning, that is, the penetration of distributed services.
In the micro-service scenario, a complete request will span multiple computing (service) nodes, but it becomes less direct and effective for various testing and monitoring methods with the node as the profile. It is difficult to analyze the failure and performance failure of a request link from a computing node profile, because the data on a computing node profile is mixed data, and it is impossible to distinguish that the data in it comes from that request. The original method cannot completely redepict all the information on a calling link. The popular APM technology in the industry can realize this kind of call link analysis to some extent, this technology is mainly used for monitoring, the data reflected is at the component level, and samples are often taken for performance considerations, which can not meet the code-level analysis requirements of the test.
Micro services adopt the strategy of "divide and conquer", while precision testing adopts the strategy of "overview of the overall situation" in the testing and operation control of micro services. Precision testing in the compilation phase, re-regard all the modules of the microservice as a complete project, compile and insert uniformly, and redeploy the instrumented code to the original node. The agent startup required by distributed tracking is added to the start-up process of the micro-service, and the full call path analysis of the code reaching the test case level in the micro-service scenario can be completed. Because the microservice has multiple program modules, the nebula test platform supports module-level incremental compilation mode, that is, each compilation replaces a module to generate a new version, without the need to compile all the microservice modules completely.
Based on the principles of penetration and distributed tracking, we will focus on the following nebulae to test the capabilities of the JavaEE application server agent. Agent provides a virtual jsp technology, and all tested applications launched by agent have a virtual jsp attached to the address similar to http://www.appundertest.com/teststars.jsp. Visit this page can be used to refer to the local user, generally this setting and accurate test oscilloscope login users need to be the same. After the setup is completed, the request for the application under test will be appended with a user-identified cookie information, which will be carried and penetrated in the multi-tier architecture of the microservice. For example, from a request initiated by a browser with user identification information, to the processing thread of the application service, all code executed by this thread will be appended with this user information, and if the application invokes the services of other nodes backward, the user information will continue to be passed back to the final execution node. Because the code of each node has the code inserted by the accurate test system, it will automatically request the oscilloscope of the initiator to give back the data, so the code logic on the whole calling link can be sent to the oscilloscope. After receiving the data, the oscilloscope combines the dynamic data with the program static data in the code compilation phase to display the program call path information of the full link. From another point of view, when the micro service system has multiple requests in parallel at the same time, then each oscilloscope receives the full link execution of its own corresponding request code, while the data of other oscilloscope users and other ordinary users will not be included.
The above figure shows the invocation diagram of two nodes under a spring cloud micro-service architecture. When the entry component is accessed from the first layer and the entry component invokes the next layer node backwards, the running thread of the latter layer node automatically fetches the user information of the previous layer node and adds to the running thread control of the second layer node. In this way, the data of the two nodes can be received through the accurate test oscilloscope (the login user ID is the same as the request ID). When multiple users visit the distributed application at the same time, the data from different users are automatically separated, routed to the corresponding oscilloscope, and finally corresponding to the use case.
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.