Skip to content

Document location of GUT panel in editor #617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 5, 2024

Conversation

nycdotnet
Copy link
Contributor

@nycdotnet nycdotnet commented Jun 2, 2024

I am new to Godot but an experienced unit tester. It took me a bit to figure out where the GUT panel was. Hopefully this helps to clear it up for the next person. Thanks for creating this.

Copy link
Owner

@bitwes bitwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I keep meaning to add this and then not getting to it. I've requested a minor change to include the image you added in the Quick Start page.

@@ -7,7 +7,7 @@ Setup doesn't get any simpler than what is already on the [install page.](Instal


## Run Tests
* Configure the directories where your tests are in the Gut Panel settings.
* Configure the directories where your tests are in the [Gut Panel](Install#activate) settings.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to:

* Open the GUT panel
![Gut Panel Location](_static/images/gut_panel_where.png)
* Configure the directories where your tests are in the [Gut Panel](Install#activate) settings.

@nycdotnet
Copy link
Contributor Author

OK I think I have it good now. Note the extra whitespace is required to get the GitHub flavored markdown to render with the wide image on the line below. It looks ok on my fork where the image links.

https://github.com/nycdotnet/Gut/blob/docs-gut-panel/documentation/docs/Quick-Start.md

@nycdotnet
Copy link
Contributor Author

Actually I don't think it makes sense to link to the other page anymore - I am going to add a different screenshot.

@nycdotnet
Copy link
Contributor Author

nycdotnet commented Jun 4, 2024

OK I think this seems pretty good now, but please let me know if you want any other changes (or for example if I should clean up the screenshots and hand-drawn arrows)

@nycdotnet nycdotnet changed the title Document location of Gut panel in editor Document location of GUT panel in editor Jun 4, 2024
Copy link
Owner

@bitwes bitwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the additional image for configuring directories, but I thought it should have a little more context. So I started typing and moving things around...and then typed some more. I came up with the following which should replace the "Setup" section (now Install) and the "Run Tests" section.

## Install
Install GUT from the Asset Library.  For more details and alternate install methods, check the [install page](Install).


## Running Tests

### Open the GUT panel
Click the word GUT in the bottom bar of the editor.<br>
![GUT Panel Location](_static/images/gut_panel_where.png)

GUT Panel Parts<br>
![Gut Panel](_static/images/gut_panel.png)


### Configure Directories
* In the Settings Subpanel, configure the directories where your tests are/will be (you may need to scroll the Settings Subpanel).
* "Include Subdirs" will include any subdirectory of any directories you enter (on by default).

![GUT Panel Test Directories](_static/images/gut_panel_test_directories.png)

### Run Your Tests
* Click "Run All" to run all your tests (top left of the GUT Panel).
* Run a single script:  open a test script and click the button with your test script's name (after "Current", test_test.gd in the GUT Panel image).
* Run an Inner Class:  You will get a button for an InnerClass the cursor is in as well (TestAssertEq in the GUT Panel image)
* Run a single test:  put the cursor inside a test function, click the button with your test function's name (test_fails_when_number_not_equal in the GUT Panel image).

Mouse-over labels and buttons in the GUT panel for more information.  You can even set keyboard shortcuts for all of the GUT panel actions ("Configure Shortcuts" in the GUT Panel image).

You can also run tests via the [command line](Command-Line) and through [VSCode](https://marketplace.visualstudio.com/items?itemName=bitwes.gut-extension)

Feel free to make adjustments. This made sense to me, but the help isn't for me.

If you want to make the arrows look more similar to the arrows in the GUT Panel image I would appreciate that.

@bitwes
Copy link
Owner

bitwes commented Jun 4, 2024

Do you think the "Creating Tests" section should come before the "Running Tests" section? I kept wanting to either make reference to it in "Running Tests", which then made me want to move it.

@nycdotnet
Copy link
Contributor Author

Yeah probably. Will take another cut.

@nycdotnet
Copy link
Contributor Author

OK how's this? It's mostly your copy but I made some tweaks and also made two example unit tests just for demonstration's sake.

@nycdotnet
Copy link
Contributor Author

I didn't update the images - if you're happy with this I can still do that if you want.

Copy link
Owner

@bitwes bitwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you. As I said this one has been on the list for awhile, I'm really happy to have this done.

@bitwes bitwes merged commit 8f7d657 into bitwes:main Jun 5, 2024
@nycdotnet
Copy link
Contributor Author

cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants