Code Monkey home page Code Monkey logo

examples's Introduction

Background

Hi there!

You can use this example repository to get a sense of how Launchable’s predictive test selection works.

We’ve created a very basic application — just four files and four tests — and trained a machine learning model using full runs of the test suite.

We’ve set up a pre-merge pipeline that runs on every pull request, which is a very common pattern. However, instead of running the entire test suite, we’ll use Launchable to select the right tests to run for each code change, saving lots of time.

Try it yourself

You can follow this flow entirely within GitHub; you just need a GitHub account:

  1. First, fork this repository.
  2. Then, navigate to gradle/src/main/java/example in your fork.
  3. Click on Add.java.
  4. Click the pencil icon to edit the file.
  5. Change line 5 fromreturn x+y; to return x*y;.
  6. Use the buttons at the bottom of the page to commit this change directly to the master branch.
  7. Then, navigate to the Pull requests section in your fork repository
  8. Click New pull request. The subsequent Compare changes page should automatically select your fork as the source and this repository as the target.
  9. Go ahead and create the pull request between your fork and the launchableinc/examples repository. This will kick off the PR test run with Launchable!
  10. Click on the “Checks” in the pull request view.
  11. Open up the build job and open the “Run tests with Gradle and Launchable” step.

Here, you can see how

  • We installed Launchable CLI to easily communicate with Launchable.
  • We sent the changed files in this build to Launchable (in this case, this is just Add.java).
  • We asked for and received a 25% subset of tests for this change.
  • We ran only that one test, saving time 💪

If you have long running tests that you want to shrink or run earlier in your pipeline, you can sign up for a free Launchable trial at app.launchableinc.com/signup!

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.