Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collector automated testing for storage module #1034

Closed
1 task done
peng-yongsheng opened this issue Apr 4, 2018 · 2 comments
Closed
1 task done

Collector automated testing for storage module #1034

peng-yongsheng opened this issue Apr 4, 2018 · 2 comments
Assignees
Labels
backend OAP backend related. question End user question and discussion.
Milestone

Comments

@peng-yongsheng
Copy link
Member

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Feature or performance improvement

Requirement or improvement

  • Please describe about your requirements or improvement suggestions.

In the feature, there will be several storage implementations, such as H2, ElasticSearch transport client, ElasticSearch Rest client, ShardingJDBC. But to this day, we determine whether a system functions as intended by the manual test. It's too hard to ensure all of them have the same implementations.

Discuss how to do it. @wu-sheng @acurtain @wengangJi

Overview of automated testing projects

  • Forked source codes
  • Test toolkit
  • Docker compose

Forked source code

The source codes where the project resides, contributors fork the "incubator-skywalking" project and program the storage module implementation with different database.

[Source code project](https://github.com/{Account ID}/{forked project name from incubator-skywalking})

Test toolkit

The source codes which used to mock datas, send to the collector, verify the datas, shell script for startup.

Shell script:

  1. Variable definition: Forked project git address, Docker compose project git address
  2. Maven package the forked project
  3. Maven package toolkit project
  4. Get the docker compose define and run

Test toolkit

Docker compose( Create new project when it not exist )

This project contains the docker compose define, collector application config file.

Docker compose:

  • Define database service uses a public image
  • Bind mount for forked project package and toolkit project package

Config file:

  • Config the database information because of this file could not PR into "incubator-skywalking" project. The "incubator-skywalking" project default storage must use H2 implementation.

[Docker compose](https://github.com/SkywalkingTest/collector-[database name]-docker)
Database name for example: h2, es-transport, es-rest

@peng-yongsheng peng-yongsheng added backend OAP backend related. feature New feature labels Apr 4, 2018
@peng-yongsheng peng-yongsheng added this to the 5.0.0-beta milestone Apr 4, 2018
@wu-sheng
Copy link
Member

wu-sheng commented Apr 4, 2018

[Source code project](https://github.com/{Account ID}/{forked project name from incubator-skywalking})

Forked project name is normally as same as ours. So, we can use the same name in default.

Test toolkit

Test toolkit should be provided as a public image, just download and use.

Docker compose

Because only two files are required, no need to create so many repositories in our org. I prefer use different folders. In pr, contributor can choose to use our provided docker-compose to test their bug-fix or feature, or they can provided one in our docker-compose-fork repo.

After docker-compose review, tested, passed, merged, the pr can be merged finally. In that cases, we have more test vessels for support different scenario.

Finally, we can use some ci env to run all cases(docker-compose) for full check, before release, or test in some check point.

@wu-sheng
Copy link
Member

wu-sheng commented May 3, 2018

Closing this discussion.

@wu-sheng wu-sheng closed this as completed May 3, 2018
@wu-sheng wu-sheng added question End user question and discussion. and removed feature New feature labels May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend OAP backend related. question End user question and discussion.
Projects
None yet
Development

No branches or pull requests

3 participants