All Projects → SketchUp → testup-2

SketchUp / testup-2

Licence: MIT License
TestUp 2 for SketchUp - A GUI wrapper for running Minitest in SketchUp

Programming Languages

ruby
36898 projects - #4 most used programming language
typescript
32286 projects
Vue
7211 projects
C++
36643 projects - #6 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to testup-2

sketchup-shapes
Shapes adds new tools for drawing more shapes and primitives in SketchUp.
Stars: ✭ 19 (-9.52%)
Mutual labels:  extension, sketchup
vsc
☢️ A fresh-looking, neon theme for Visual Studio Code Almost radioactive.
Stars: ✭ 24 (+14.29%)
Mutual labels:  extension
read-medium-extension
Chrome extension for reading Medium for free without leaving the page.
Stars: ✭ 55 (+161.9%)
Mutual labels:  extension
talkie
Text-to-speech browser extension button. Select text on any web page, and have the computer read it out loud for you by simply clicking the Talkie button.
Stars: ✭ 43 (+104.76%)
Mutual labels:  extension
Pinboard-Plus
Pinboard.in Chrome extension, not official.
Stars: ✭ 133 (+533.33%)
Mutual labels:  extension
blur-my-shell
Extension that adds a blur look to different parts of the GNOME Shell, including the top panel, dash and overview
Stars: ✭ 516 (+2357.14%)
Mutual labels:  extension
super-encourager
vscode插件: 超级鼓励师 奖励下努力工作的你!
Stars: ✭ 42 (+100%)
Mutual labels:  extension
core
🔥 Antares Core Implemenation. Most important project layer, this is the heart for your app. ACL, notifiter, console, geoip, areas, utils and many more...
Stars: ✭ 24 (+14.29%)
Mutual labels:  extension
hstore-extension
The encoder/decoder and set of the doctrine functions for the postgresql type `hstore`
Stars: ✭ 14 (-33.33%)
Mutual labels:  extension
Bridge
🌉 New tab. For devs. F*ck you.
Stars: ✭ 25 (+19.05%)
Mutual labels:  extension
b2ntp
Kanban style New Tab Page extension with your bookmarks and powerful search
Stars: ✭ 50 (+138.1%)
Mutual labels:  extension
gitlab-job-log-viewer
Browser extension for code highlighting raw logs in Gitlab CI
Stars: ✭ 21 (+0%)
Mutual labels:  extension
millennials-to-snake-people
🐍 Chrome extension that replaces occurrences of 'Millennials' with 'Snake People'
Stars: ✭ 187 (+790.48%)
Mutual labels:  extension
apps
daily.dev application suite
Stars: ✭ 253 (+1104.76%)
Mutual labels:  extension
vscode-odoo-snippets
Develop Odoo modules faster and with no Typing Errors.
Stars: ✭ 20 (-4.76%)
Mutual labels:  extension
notion-enhancer.github.io
the notion-enhancer project's website
Stars: ✭ 24 (+14.29%)
Mutual labels:  extension
vscode-open-in-github
Visual Studio Code Extension — Open file in GitHub
Stars: ✭ 35 (+66.67%)
Mutual labels:  extension
omegleip
Shows the IP and Geolocation of the stranger. Written in Javascript as a Extension
Stars: ✭ 33 (+57.14%)
Mutual labels:  extension
eshteb
Reduces the anger of an Iranian when typing in the wrong language!
Stars: ✭ 42 (+100%)
Mutual labels:  extension
pass-fzf
Fuzzy finder for pass
Stars: ✭ 20 (-4.76%)
Mutual labels:  extension

TestUp 2 for SketchUp

TestUp is a wrapper on top of the minitest gem. It allow SketchUp Extension developers to write minitest tests that runs within SketchUp.

Requirements

  1. SketchUp 2014 or newer.

Setup for Extension Developers

Easy: Download RBZ from the Releases tab on GitHub.

Latest: Install TestUp from git source (See Setup for Contributing). Requires Node to build webdialog content before 2.3+ versions can be used.

Check out the wiki for details on creating tests. Make sure to also refer to minitest documentation.

Examples of extension projects implementing TestUp tests:

Setup for Contributing/Running from Source

TestUp require NodeJS to build webdialog resources: https://nodejs.org/en/ (Version 10.4 was used to build TestUp 2.3)

  1. Fork the project to your own GitHub account. This is important so that we can do code review on changes done. Do not push directly to the main repository.

  2. Clone your fork to your computer.

  3. Open a command line at the project root:

    1. npm install
    2. npm run build

    You can also use npm run build -- --watch to automatically rebuild whenever files changes.

  4. Add a helper Ruby file in your Plugins folder:

# load_testup.rb
# This adds the source directory to Ruby's search path and
# loads TestUp 2.
$LOAD_PATH << "C:/Users/YourUserName/Documents/testup-2/src"
require "testup.rb"

Optionally you can download a RBZ from the Releases tab on GitHub. Beware that this might not be always up to date. Setting up from git is recommended in order to easily keep up to date.

Setup for SketchUp Internal Development

Follow the same steps as for "Setup for Contributing".

In order to load tests from our source code the paths where our tests are needs to be updated. This is done from the Preference dialog found under the TestUp dialog.

Click the gear symbol and you should see a list of paths. By default these will be pointing to the git repository's copy of our tests.

Packaging RBZ for Release

To package an RBZ from the content of the src directory run: (This assumes the binary libraries and webdialog resources have been built.)

npm run package

To build webdialogs and package in a single command:

npm run release

The RBZ appear in a generated archive directory in the project root.

Logging and Re-running

TestUp will log the details of a test-run. These can be found by using the menu Extensions > TestUp > Open Log Folder.

In there you will find .log and .run files.

The .log files are for human reading, containing information about the environment and what tests ran.

The .run files are JSON files which can be used to re-play a test-run. From the TestUp main dialog, click the Re-run... button and select the .run file you are interested in. This will re-run the exact same tests with the same seed so they are also run in the same order.

If you need to re-run a particular run several times you can use Extensions > TestUp > Saved Runs > Add Run. Then you can pick it from the drop-down after choosing Extensions > TestUp > Saved Runs > Set Re-play Run.

Running from Terminal

Running a Full Suite

Windows:

 "C:\Program Files\SketchUp\SketchUp 2021\SketchUp.exe" -RubyStartupArg "TestUp:CI:Path: C:\Users\Thomas\SourceTree\TestUp2\tests\TestUp UI Tests" > results.json

macOS:

'/Applications/SketchUp 2021/SketchUp.app/Contents/MacOS/sketchup' -RubyStartupArg 'TestUp:CI:Path: C:/Users/Thomas/SourceTree/TestUp2/tests/TestUp UI Tests' > results.json

In the example above TestUp will run a test suite given its path. The > results.json will redirect the STDOUT to a file which will contain the JSON results of the test run.

Running with Custom Config

# Config.yml
# Required:
Path: C:\Users\Thomas\SourceTree\TestUp2\tests\TestUp UI Tests

# Optional: (By default, don't include a fixed seed!)
Seed: 123 # The seed number for the random order of execution of the tests

# Optional:
# By default the results will be output to STDOUT. This can be redirected to a
# file.
Output: C:\Users\Thomas\SourceTree\TestUp2\tests\results.json

# Optional:
# Set to true to prevent SketchUp from closing. Useful for debugging purposes.
# Note that if `Output` is used the results won't be written until SketchUp is
# closed.
KeepOpen: false

# Optional:
# List the set of sets you want to run.
#   Run all tests in test case: TC_TestCaseName#
#   Run specific test: TC_TestCaseName#test_testname
Tests:
- TC_TestSamples#
- TC_TestErrors#test_pass
- TC_TestErrors#test_skip

Windows:

"C:\Program Files\SketchUp\SketchUp 2021\SketchUp.exe" -RubyStartupArg "TestUp:CI:Config: \Full\Path\To\Config.yml"

macOS:

'/Applications/SketchUp 2021/SketchUp.app/Contents/MacOS/sketchup' -RubyStartupArg 'TestUp:CI:Config: /Full/Path/To/Config.yml'

Configuration File Variables

%CONFIG_DIR%

Expands to the directory where the configuration file is located.

Given a configuration file located at C:/Users/Thomas/SourceTree/TestUp2/testup-ui-ci.yaml then %CONFIG_DIR% will resolve to C:/Users/Thomas/SourceTree/TestUp2.

# testup-ui-ci.yaml
Path: "%CONFIG_DIR%/tests/TestUp UI Tests"
Output: "%CONFIG_DIR%/tests/ui-tests-results.json"

Troubleshooting

MiniTest

If you should get errors that relate to failing to install MiniTest then you can attempt to install manually from a backup copy in this GitHub repository:

# From the SketchUp Ruby Console:
Gem.install('/path/to/repo/testup-2/gems-backup/minitest-5.4.3.gem')
# Then restart SketchUp.

Credits

Thanks to Mark James for making his excellent icon set "Silk" available. Portions of the set is used in this project. Some file names has been renamed and some icons where mixed to create new status indicators for test result. http://www.famfamfam.com/lab/icons/silk/

License

The MIT License (MIT)

See the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].