GithubHelp home page GithubHelp logo

isabella232 / skywalking-agent-test-tool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/skywalking-agent-test-tool

0.0 0.0 0.0 212 KB

The integration test tool for Apache SkyWalking, including Mock OAP server and trace validator.

Home Page: https://skywalking.apache.org/

License: Apache License 2.0

Shell 0.98% Java 97.80% Makefile 1.22%

skywalking-agent-test-tool's Introduction

Apache SkyWalking Agent Test Tool Suite

Sky Walking logo

Twitter Follow

CI

SkyWalking Agent Test Tool is a tremendously useful test tools suite in a wide variety of languages of Agent. Includes mock collector and validator. The mock collector is a SkyWalking receiver, like OAP server.

The mock collector is responsible for mocking the SkyWalking OAP receiver to collect data from the agent. It receives data from agent through GRPC and HTTP REST API(in plan). And then it can be downloaded by Http API that the mock collector collected(service registered, instance registered, and segments). Eventually, validate the file downloaded from mock collector by using SkyWalking Validator.

Apache SkyWalking Mock Collector

Requirement

  1. JDK 1.8+
  2. Maven

How to install

The mock collector is written by pure-Java. It compiles and packages through Maven.

mvn package -DskipTests
unzip ./dist/mock-collector.tar.gz -d ./mock-collector
cd ./mock-collector
bash ./bin/collector-startup.sh

after above steps, we can check whether the mock collector is available through HTTP API. To visit http://localhost:12800/healthCheck and get the response with success in the body of content.

Finally, To visit follow URL to download the data as yaml file, which can be used by SkyWalking Validator Tool.

http://localhost:12800/receiveData

How to config on agent

We can modify the configurations of agent in ./config/agent.conf, as follows

# Backend service addresses.
collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:127.0.0.1:19876}

or specify the jvm arguments like:

# Backend service addresses.
-DSW_AGENT_COLLECTOR_BACKEND_SERVICES=127.0.0.1:19876

Data validation in Mock Collector

Currently, we integration SkyWalking Validator Tool in Mock Collector. We can post the expectedData.yaml to /dataValidate after agent reported.

Apache SkyWalking Validator Tool

Validator Tool is a data validating tool. It is responsible for validating the expected data with actual data.

java -jar \
    -Xmx256m -Xms256m \
    -DcaseName="case_name" \
    -DtestCasePath=/path/to/download-folder \
    ${TOOLS_HOME}/skywalking-validator-tools.jar

NOTICE: the expected data have to call expectedData.yaml, and the actual data must name as actualData.yaml. These files save all the segment and meter data, and in the same directory, /path/to/download-folder. JVM argument caseName just for show in the log.

The format and documentation of expectedData.yaml could be found in SkyWalking plugin test doc

Contact Us

License

Apache 2.0

skywalking-agent-test-tool's People

Contributors

alonelaval avatar arugal avatar calvinkirs avatar dagmom avatar dmsolr avatar evanljp avatar harvies avatar kezhenxu94 avatar mrproliu avatar shikugawa avatar wu-sheng avatar yaojingguo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.