How To Create bats-core Files

Files with the extension .bats are displayed with a little bat icon to tell that it’s a bats–core file. BashSupport Pro comes with a basic template for bats–core tests.

If you don’t like the guided steps below, just create a file with this extension as you’re used to.

BashSupport Pro supports you to manage bats-core files:

  1. First, choose FileNew from the main menu.
    How to create a new bats-core file in BashSupport Pro
    How to create a new bats-core file in BashSupport Pro
  2. Click on the item bats-core Test. A new dialog pops up.
  3. Now enter the name of the new bats-core file and confirm by Enter . The file extension .bats is automatically appended if you don’t enter it.
    Defining the name of a new bats-core file
    Defining the name of a new bats-core file
  4. BashSupport Pro now creates the new file and opens an editor to show it. The file already contains a simple test setup to run your first test.
    A new bats-core file created by BashSupport Pro
    A new bats-core file created by BashSupport Pro