Git Product home page Git Product logo

ablunit-test-runner's Introduction

ABLUnit Test Runner ๐Ÿƒโ€โ™‚๏ธ๐Ÿƒ๐Ÿƒโ€โ™€๏ธ

CircleCI Maintainability Rating Coverage VSCode Marketplace Version

The ABLUnit Test Runner extension for VSCode integrates ablunit tests into the test explorer.

๐ŸŒด Features

  • Execute ABLUnit tests from the VSCode Test Explorer View
  • Display test results in the VSCode Test Results View
  • Color coded line coverage highlighting in the editor

๐Ÿ“ท Code Coverage Screenshot

code coverage example screenshot

๐Ÿ“ Supported OpenEdge Versions

This project was developed using the Progress OpenEdge Developers Kit: Classroom Edition. It was primarily tested with 12.2.12, but the unit tests are run for 12.7.0 during the CI builds too.

๐Ÿงช VSCode Proposed TestCoverage API

VSCode is working to improve the testing runner by adding code coverage support. This extension is designed to work with the proposed API and will fully integrate it when officially available. The current implementation mimics some of the proposed functionality where easily possible. For a sneak peak at the new functionality install ablunit-test-runner-insiders.vsix (see releases)vsco into a VSCode Insiders installation. Then, relaunch VSCode with the --enable-proposed-api=kherring.ablunit-test-runner flag.

See VSCode Documentation -> Using Proposed API for more information.

๐Ÿ“ฆ Screnshot with Proposed Test API

proposed test api example screenshot

โ›บ Configuration

Configuration is optional. Many workspaces will work without any configuration. However, there are advanced options available via the VSCode settings and a test profile configuration file (.vscode/ablunit-test-profile.json).

๐Ÿ“ Settings Configuration

The settings config allows for a few global options, described in more detail below. This example shows a test file glob pattern and another with a path to a dbconnections .pf file. The ablunit.files.include setting is required for the extension to find tests.

.vscode/settings.json with include and exclude patterns:

{
  "ablunit.files.include": [
    "test/**/*Test.{cls,p}"
  ],
  "ablunit.files.exclude": [
    "src/sandbox/**"
  ]
}

.vscode/settings.json with dbconnections .pf file:

{
  "ablunit.files.include": [
    "test/**/*Test.{cls,p}"
  ],
  "ablunit.params": "-pf path/to/dbconnections.pf"
}

The following table gives a brief description of the available settings via the UI or settings.json files.

Setting Default Description
ablunit.discoverAllTestsOnActivate true Search all workspace files for tests on extension activation. It may be beneficial to disable this for large workspaces, in which case the extension will find tests as files are accessed.
ablunit.files.include [ "**/*.{cls,p}" ] Glob pattern array matching test files.
ablunit.files.exclude [ "**/.builder/**" ] Glob pattern array to exclude test files.
ablunit.importOpenedgeProjectJson true Import configuration settings from `openedge-project.json` when possible.
ablunit.test.classlabel classname The label format for test classes. Example for class with path com/example/myClass.cls:
  • class-type-name example: com.example.myClass
  • filename example: myClass.cls

๐Ÿงช Test Profile Configuration

The .vscode/ablunit-test-profile.json has additional configuration similar to launch configurations.

A default profile is created when using the ABLUnit: Configure Test Profile command and selecting ABLUnit - Run Tests. This configuration has comments describing the options available.

Note: Only the first test profile will be imported. In the future this extension will allow for multiple entries.

๐Ÿ‘ทโ€โ™‚๏ธ Contributing

See CONTRIBUTING.md

๐Ÿ’ป Development

  • npm install
  • Make any changes you wish
  • npm install -g --save-dev @vscode/vsce"
  • npm test or use the Extension Test Runner

๐Ÿ”— Links

๐Ÿค“ About Me

This is my first VSCode extension, and my first TypeScript project. I am sure there are many ways to improve the code, and I welcome any feedback. I'm also open to collaboration for anyone who might wish to contribute.

Quality code is my passion. Unit testing is an important component of ensuring code remains functional when future changes are made. I hope this extension helps others to embrace TDD and improve their code.

ablunit-test-runner's People

Contributors

kenherring 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.