I posted this in the Slack workspace, but thought I’d make a post here for longevity.
I recently created a Gist of robotframework.code-snippets
for use with VS Code.
If you’re not familiar with VS Code snippets, here’s some info. The TL;DR is that you just type some short-hand and VS Code suggests the macro expansion for you.
For example, if I begin to type suite
in a new file that I’ve told VS Code is a file, I get this:
*** Settings ***
Documentation What does this testing suite cover?
Library String # just an example
Library ${EXECDIR}/path/to/CUSTOM_LIBRARY.py
Resource ${EXECDIR}/path/to/NAME_OF_ANOTHER.resource
Suite Setup SETUP_HERE
Suite Teardown TEARDOWN_HERE
*** Variables ***
${SOME_TEXT} Hello
${AN_INT} ${42}
@{A_LIST} All Cows Eat Grass
&{A_DICT} StrKey=A string IntKey=${22}
*** Test Cases ***
EXAMPLE TEST CASE (use 'tc' snippet instead)
[Documentation] DOCS HERE
[Tags] TAGS_HERE
[Setup] SETUP_HERE
No Operation
[Teardown] TEARDOWN_HERE
*** Keywords ***
EXAMPLE KEYWORD (use 'kw' snippet instead)
[Documentation] Move this to resource file later
[Arguments] ${param_1} ${param_2} # if args are needed...
No Operation
*** Comments ***
These comments are entirely ignored! Write a pie recipe if you want!
GIF of using the Keyword (kw) snippet: