Code Monkey home page Code Monkey logo

memoryleakscheck's Introduction

๐Ÿ”Ž CILeaksDetector

Static Badge

This is a simple tool to help you checking for leaks in your program automatically in the most accurate way, then it will send the report directly to your development workflow (Pull request/Slack/...). And even better, you can easily integrate this tool to your CI workflow.

Table of Contents

Installation

You can go to GitHub Releases page to download release executable program.

Usage

The most simple way to run the leaks checking process is:

    leaksdetector $subcommand -p $YOUR_APP_NAME

How to use subcommands

Check out this document for how to use specific subcommands

How to report the result to your development workflow

Check out this document for how to customize the process to send the result to your workflow

Current supported testing frameworks

Why I used Maestro?

  1. I need a testing tool which doesn't kill the program after the testing finished execution. And Maestro support that. Also Maestro is very easy to integrate & use.
  2. XCUITest can not preserve running program after test execution. Read more at here

How it works

  1. Use a testing tool to simulate the UI flow in your app.

  2. Generate memgraph using leaks tool provided by Apple.
    Find more about leaks tool and memgraph here

  3. Use leaksdetector program to proceed the memgraph file. If any leaks founded, it will use Danger to post a message to your PR/slack, ...

How to support your testing framework

If you're using another UI testing framework which also support preserve the execution of the program after finish testing, you can create another PR to update the leaksdetector.
It's easy to do that, just need to follow these steps:

  1. Open Executor.swift, create a new instance of your testing frameworks. Your new instance needs to conform to Executor protocol.
    struct XCUITestExecutor: Executor {
        
        func simulateUI() throws {
            // Custom logic to start simulating UI
        }
        
        func generateMemgraph(for processName: String) throws {
            // Custom logic to start generating memgraph for a `processName`
        }
        
        func getMemgraphPath() -> String {
            // return the path to the generated memgraph
        }
    }
    
  1. Go to Commands folder to create a new command for your testing framework. Please refer to MaestroCommand.

Publication

I've published an article about this on Medium. You can take a look at here

memoryleakscheck's People

Contributors

hoangatuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.