Skip to content
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

Add GizmosShowOnGameViewAttribute #37

Merged
merged 4 commits into from
Oct 30, 2023
Merged

Add GizmosShowOnGameViewAttribute #37

merged 4 commits into from
Oct 30, 2023

Conversation

nowsprinting
Copy link
Owner

GizmosShowOnGameViewAttribute is an NUnit test attribute class to show/hide Gizmos on GameView during the test running.

This attribute can attached to test method only.
Can be used with sync Test, async Test, and UnityTest.

Usage:

using NUnit.Framework;
using TestHelper.Attributes;

[TestFixture]
public class MyTestClass
{
    [Test]
    [GizmosShowOnGameView(true)]
    public void MyTestMethod()
    {
        // Show Gizmos on GameView.
    }
}

Note
In batchmode, open GameView window.

@github-actions github-actions bot added the enhancement New feature or request label Oct 30, 2023
@github-actions

This comment has been minimized.

@github-actions
Copy link

Code Metrics Report

master (d30a554) #37 (46d4195) +/-
Coverage 58.3% 63.2% +4.9%
Code to Test Ratio 1:1.9 1:1.9 -0.0
Test Execution Time 4m57s 4m18s -39s
Details
  |                     | master (d30a554) | #37 (46d4195) |  +/-  |
  |---------------------|------------------|---------------|-------|
+ | Coverage            |            58.3% |         63.2% | +4.9% |
  |   Files             |               22 |            23 |    +1 |
  |   Lines             |              482 |           527 |   +45 |
+ |   Covered           |              281 |           333 |   +52 |
- | Code to Test Ratio  |            1:1.9 |         1:1.9 |  -0.0 |
  |   Code              |              499 |           542 |   +43 |
+ |   Test              |              938 |          1013 |   +75 |
+ | Test Execution Time |            4m57s |         4m18s |  -39s |

Code coverage of files in pull request scope (40.2% → 65.9%)

Files Coverage +/-
Runtime/Attributes/GizmosShowOnGameViewAttribute.cs 100.0% +100.0%
Runtime/Attributes/TakeScreenshotAttribute.cs 100.0% 0.0%
RuntimeInternals/GameViewControlHelper.cs 47.3% +11.7%
RuntimeInternals/Wrappers/UnityEditor/GameViewWrapper.cs 60.0% +39.3%

Reported by octocov

@nowsprinting nowsprinting merged commit c6993b6 into master Oct 30, 2023
8 checks passed
@nowsprinting nowsprinting deleted the feature/gizmos branch October 30, 2023 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant