SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.5 KiB

4 years ago
  1. # Workflow: How to create a test
  2. To create a test, do the following:
  3. 1. Create your *Test* [assembly folder](./workflow-create-test-assembly.md) and select it in the **Project** window.
  4. 2. Click the button **Create Test Script in current folder** option in the **Test Runner** window.
  5. ![EditMode create test script](./images/editmode-create-test-script.png)
  6. 3. It creates a *NewTestScript.cs* file in the *Tests* folder. Change the name of the script, if necessary, and press Enter to accept it.
  7. ![NewTestScript.cs](./images/new-test-script.png)
  8. Now you’ll see two sample tests in the Test Runner window:
  9. ![Test templates](./images/test-templates.png)
  10. Now you can open the tests in your favorite script editor.
  11. You can also create test scripts by navigating to **Assets** > **Create > Testing** > **C# Test Script**, unless adding a test script would result in a compilation error.
  12. > **Note**: Unity does not include `TestAssemblies` ([NUnit](http://www.nunit.org/), Unity Test Framework, and user script assemblies) when using the normal build pipeline, but does include them when using **Run on <Platform>** in the Test Runner window.
  13. ## Filters
  14. If you have a lot of tests, and you only want to view/run a sub-set of them, you can filter them in three ways (see image above):
  15. * Type in the search box in the top left
  16. * Click a test class or fixture (such as **NewTestScript** in the image above)
  17. * Click one of the test result icon buttons in the top right
  18. For more information, see [Edit Mode vs. Play Mode tests](./edit-mode-vs-play-mode-tests.md).