All Projects → qiniu → Goc

qiniu / Goc

Licence: apache-2.0
A Comprehensive Coverage Testing System for The Go Programming Language

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Goc

FlaUIRecorder
UIAutomation test recorder for using with FlaUI library.
Stars: ✭ 23 (-92.81%)
Mutual labels:  testing-tools
ru-qa-resources
Список ресурсов на тему QA
Stars: ✭ 15 (-95.31%)
Mutual labels:  testing-tools
Chn Eolinker Ams Lite 4.0 For Java
中国最大的API接口管理平台,3.x开源发行版,支持多国语言[英语、简体中文、繁体中文]
Stars: ✭ 275 (-14.06%)
Mutual labels:  testing-tools
StrangerData
👽 A .NET database populator for testing purposes
Stars: ✭ 22 (-93.12%)
Mutual labels:  testing-tools
bron
🏃‍♂️ Fast & tiny test runner for Node.js
Stars: ✭ 17 (-94.69%)
Mutual labels:  testing-tools
behave-restful
BDD Framework to Test REST Services and APIs
Stars: ✭ 47 (-85.31%)
Mutual labels:  testing-tools
jdbdt
JDBDT: Java Database Delta Testing
Stars: ✭ 12 (-96.25%)
Mutual labels:  testing-tools
Gotests
Automatically generate Go test boilerplate from your source code.
Stars: ✭ 3,597 (+1024.06%)
Mutual labels:  testing-tools
jest-dashboard
Command Line Dashboard for Jest
Stars: ✭ 61 (-80.94%)
Mutual labels:  testing-tools
Recon My Way
This repository created for personal use and added tools from my latest blog post.
Stars: ✭ 271 (-15.31%)
Mutual labels:  testing-tools
sbml-test-suite
The SBML Test Suite is a conformance testing system. It allows developers and users to test the degree and correctness of the SBML support provided in a software package.
Stars: ✭ 21 (-93.44%)
Mutual labels:  testing-tools
super-powered-api-testing
Comparisons of powerful API testing tools
Stars: ✭ 25 (-92.19%)
Mutual labels:  testing-tools
puppeteer-screenshot-tester
Small library that allows us to compare screenshots generated by puppeteer in our tests.
Stars: ✭ 50 (-84.37%)
Mutual labels:  testing-tools
jest-wrap
Fluent pluggable interface for easily wrapping `describe` and `it` blocks in Jest tests.
Stars: ✭ 35 (-89.06%)
Mutual labels:  testing-tools
Awesome Unit Testing Swift
A curated collection of awesome blog articles, books, talks, podcasts, tools/frameworks and examples.
Stars: ✭ 272 (-15%)
Mutual labels:  testing-tools
slack-mock
A Slack API mocker for Slack bot integration tests.
Stars: ✭ 61 (-80.94%)
Mutual labels:  testing-tools
bat
Gherkin based DSL for testing HTTP APIs via Cucumber.JS
Stars: ✭ 30 (-90.62%)
Mutual labels:  testing-tools
Nut.js
Native UI testing / controlling with node
Stars: ✭ 309 (-3.44%)
Mutual labels:  testing-tools
Pho
BDD test framework for PHP
Stars: ✭ 287 (-10.31%)
Mutual labels:  testing-tools
Kotest
Powerful, elegant and flexible test framework for Kotlin with additional assertions, property testing and data driven testing
Stars: ✭ 3,234 (+910.63%)
Mutual labels:  testing-tools

goc

Go Report Card Build Release codecov GoDoc

中文页 |

goc is a comprehensive coverage testing system for The Go Programming Language, especially for some complex scenarios, like system testing code coverage collection and accurate testing.

Enjoy, Have Fun! Demo

Installation

Download the latest version from Github Releases page.

Goc supports both GOPATH project and Go Modules project with Go 1.11+. However, for developing goc, you need to install Go 1.13+.

Examples

You can use goc tool in many scenarios.

Code Coverage Collection for Your Golang System Tests

Goc can collect code coverages at runtime for your long-run golang applications. To do that, normally just need three steps:

  1. use goc server to start a service registry center:
    ➜  simple-go-server git:(master) ✗ goc server
    
  2. use goc build to build the target service, and run the generated binary. Here let's take the simple-go-server project as example:
    ➜  simple-go-server git:(master) ✗ goc build .
    ... // omit logs
    ➜  simple-go-server git:(master) ✗ ./simple-go-server  
    
  3. use goc profile to get the code coverage profile of the started simple server above:
    ➜  simple-go-server git:(master) ✗ goc profile
    mode: atomic
    enricofoltran/simple-go-server/main.go:30.13,48.33 13 1
    enricofoltran/simple-go-server/main.go:48.33,50.3 1 0
    enricofoltran/simple-go-server/main.go:52.2,65.12 5 1
    enricofoltran/simple-go-server/main.go:65.12,74.46 7 1
    enricofoltran/simple-go-server/main.go:74.46,76.4 1 0
    ...   
    

Show Code Coverage Change at Runtime in Vscode

We provide a vscode extension - Goc Coverage which can show highlighted covered source code at runtime.

Extension

Tips

  1. To understand the execution details of goc tool, you can use the --debug flag. Also we appreciate if you can provide such logs when submitting a bug to us.

  2. By default, the covered service will listen a random port in order to communicate with the goc server. This may not be suitable in docker or kubernetes environment since the port must be exposed explicitly in order to be accessible by others in such environment. For this kind of scenario, you can use --agentport flag to specify a fixed port when calling goc build or goc install.

  3. To use a remote goc server, you can use --center flag to compile the target service with goc build or goc install command.

  4. The coverage data is stored on each covered service side, so if one service needs to restart during test, this service's coverage data will be lost. For this case, you can use following steps to handle:

    1. Before the service restarts, collect coverage with goc profile -o a.cov
    2. After service restarted and test finished, collect coverage again with goc profile -o b.cov
    3. Merge two coverage profiles together: goc merge a.cov b.cov -o merge.cov

RoadMap

  • [x] Support code coverage collection for system testing.
  • [x] Support code coverage counters clear for the services under test at runtime.
  • [x] Support develop mode towards accurate testing.
  • [x] Support code coverage diff based on Pull Request.
  • [ ] Optimize the performance costed by code coverage counters.

Contributing

We welcome all kinds of contribution, including bug reports, feature requests, documentation improvements, UI refinements, etc.

Thanks to all contributors!!

License

Goc is released under the Apache 2.0 license. See LICENSE.txt

Join goc WeChat Group

WeChat

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].