Skip to content

Language extension for VS Code to colorize Lux (LUcid eXpect scripting) test automation framework script syntax

License

Notifications You must be signed in to change notification settings

andreygrechin/lux-colorizer

lux-colorizer, Lux Syntax Highlight VS Code Extension

Lux is a universal system-level test tool written in Erlang/OTP by Håkan Mattsson and other contributors. Based on expect-like pattern, Lux offers simplified syntax, regular expressions support, switching between multiple concurrent sessions, extensive logging, post mortem analysis, debugging, and more. Testing with Lux can be a part of more valuable processes, like developing new services for Cisco NSO, CI/CD pipeline testing, troubleshooting, etc. It is well known for test automation for developing Cisco Network Service Orchestrator (NSO) with 4500 test cases per run.

An example using Monakai color theme

Some explanations "Why Lux" can be found here.

For more on Lux features, please check the official documentation.

How to install the extension

You may install the extension via VS Code Quick Open (Ctrl/Cmd+P), paste the following command, press enter, and click install.

ext install andreygrechin.lux-colorizer

Also, you may install it via VS Code marketplace by searching the name andreygrechin.lux-colorizer.

How to use the extension

After the installation, the extension will be enabled automatically.

To use snippets, start typing a meta statement, like [loop], and VS Code will offer possible options. Use TAB to autocomplete a statement and jumping between input fields.

Useful References

  1. Lux
    1. Lux repo
    2. Lux documentation
    3. How to install Lux (Note: Lux doesn't support Windows, use WSL)
  2. TextMate
    1. TextMate Language Grammars
    2. Oniguruma regexp syntax
    3. Oniguruma flavor regexp online editor
    4. RegEx101 regexp tester
  3. More on understanding TextMate
    1. https://flight-manual.atom.io/hacking-atom/sections/creating-a-legacy-textmate-grammar/
    2. https://www.apeth.com/nonblog/stories/textmatebundle.html
    3. https://gist.github.com/Aerijo/b8c82d647db783187804e86fa0a604a1
    4. https://gist.github.com/DamnedScholar/622926bcd222eb1ddc483d12103fd315
  4. Visual Studio Code Extensions
    1. Overview
    2. Syntax Highlight Guide
    3. Semantic Highlight Guide
    4. Snippets