How to Create bats-core Files

Files with 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. Files with a #!/usr/bin/bats shebang line are also supported, but new files created with the actions always get a .bats file extension.

If you don’t like the guided steps below, just create a new file with a .bats extension or a #!/usr/bin/bats shebang line.

BashSupport Pro helps 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
© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款