🖥️python3-behave

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the python3-behave command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#  ██████╗ ██╗   ██╗████████╗██╗  ██╗ ██████╗ ███╗   ██╗██████╗       ██████╗ ███████╗██╗  ██╗ █████╗ ██╗   ██╗███████╗
#  ██╔══██╗╚██╗ ██╔╝╚══██╔══╝██║  ██║██╔═══██╗████╗  ██║╚════██╗      ██╔══██╗██╔════╝██║  ██║██╔══██╗██║   ██║██╔════╝
#  ██████╔╝ ╚████╔╝    ██║   ███████║██║   ██║██╔██╗ ██║ █████╔╝█████╗██████╔╝█████╗  ███████║███████║██║   ██║█████╗  
#  ██╔═══╝   ╚██╔╝     ██║   ██╔══██║██║   ██║██║╚██╗██║ ╚═══██╗╚════╝██╔══██╗██╔══╝  ██╔══██║██╔══██║╚██╗ ██╔╝██╔══╝  
#  ██║        ██║      ██║   ██║  ██║╚██████╔╝██║ ╚████║██████╔╝      ██████╔╝███████╗██║  ██║██║  ██║ ╚████╔╝ ███████╗
#  ╚═╝        ╚═╝      ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝╚═════╝       ╚═════╝ ╚══════╝╚═╝  ╚═╝╚═╝  ╚═╝  ╚═══╝  ╚══════╝

# Get number of all Python Behave scenarios (including all examples from Scenario Outlines)
behave -d | grep "scenarios passed" | cut -d, -f4 | sed -e 's/^[[:space:]]*//' | sed 's/untested/scenarios/g'

# Explanation: behave -d
        # -d stands for dry-run, so behave invokes formatters without executing the steps.
          # grep "scenarios passed"
          # Then we grep for the summary line containing number of all scenarios
        # cut -d, -f4
          # then we cut the last value from selected summary line that show how many scenarios were "untested" (in this context it means not executed, which is exactly what we need)
        # sed -e 's/^[[:space:]]*//'
          # Trim leading space
        # sed 's/untested/scenarios/g'
          # Lastly simple sed to replace untested with scenarios
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░