npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

umlaut

v1.0.0

Published

Generate unit tests from UML models

Readme

UMLAUT

Build Status codecov

This project is part of a submission for the MEng Degree in Computer Science at UCL (University College London).

Projects in this Repository

UML-Annotator

Tool to annotate Visual Studio UML models.

UML-Parser

Tool to convert UML models to a standard output for this project.

Output schema:

{
  "className": {
    "name": "Name of class",
    "variables": {
      "variableName": {
        "name": "Name of variable",
        "visibility": "Public/Private",
        "type": "Type of variable"
      },
      /* ...Next variable */
    },

    "methods": {
      "methodName": {
        "name": "Name of method",
        "visibility": "Public/Private",
        "type: "Return type of method",
        "arguments": {
          "argument": "Type of argument",
          /* ...Next argument */
        },

        "preconditions": [
          {
            "id": "UUID for this precondition",
            "comparison": "Comparison name",
            "arguments": [
              "Name of variable or method argument or direct value",
              /* ...Next argument */
            ]
          },
          /* ...Next precondition */
        ],

        "postconditions": [
          {
            "id": "UUID for this postcondition",
            "comparison": "Comparison name",
            "arguments": [
              "Name of variable or method argument or direct value",
              /* ...Next argument */
            ]
          },
          /* ...Next postcondition */
        ]
      },
      /* ...Next method */
    }

  },
  /* ...Next class */
}

For list of comparison names, see comparisons.json.

Input-Generator

Tool to generate inputs for tests.

Extends schema of UML-Parser, with an additional tests array on each method:

{
  "className": {
    ...
    "methods": {
      "methodName": {
        ...
        "tests": [
          {
            "condition": "Text identifying the meaning of the test",
            "arguments: {
              "argument": "Value of argument",
              /* ...Next argument */
            }
          },
          /* ...Next test */
        ]
      },
      /* ...Next method */
    }

  },
  /* ...Next class */
}

In order to generate inputs, the design of this section is for submodules to handle specific types for the test. Currently, only numerical logic is handled by the Input-Generator, though more is planned.

SMT-Solver

The SMT-Solver handles Boolean and Numerical Logic. Implementation is handled via the conversion of the annotated constraints on the methods into Satisfiability Modulo Theorem, SMT. Then by using Microsoft's z3, the constraints are solved to generate values that satisfy the constraints.

Test-Generator

Tool to take the UML model and inputs and generate the test suite.

Installation

This is a project dependent on C# (For UML-Annotator) and Node.js (For UML-Parser, Input-Generator and Test-Generator).
This project also uses ES6 syntax, which requires node version v6.0.0 at minimum.

Please ensure that node and npm are installed and available in your PATH, to correctly run this project.
Also check that node --version matches at least v6.0.0.

Node.js is available here for all major OS platforms.

Installing Locally

To install this project:

git clone https://github.com/KK578/compm091-code.git
cd compm091-code
npm install --production
npm link

This will setup the generator to work locally.

Developing

Dependencies

To develop the project, this project uses grunt.

npm install -g grunt-cli

Setup

git clone https://github.com/KK578/compm091-code.git
cd compm091-code
npm install
npm link

Linting

Ensure changes adhere to the existing coding style.
Check code changes with grunt lint.

Unit tests

To test the project, this project uses mocha, and is setup via grunt test.
For code coverage statistics, this project uses istanbul, and is setup via grunt coverage.

Continuous Integration builds is handled via Travis-CI, and is available here.
Code coverage information is handled via Codecov, and is available here.

License

This project has been templated by generator-kk578.

BSD-3 License

Copyright (c) 2017, Kevin Kwan ([email protected]).
All rights reserved.

See LICENSE.md for full license text.