Search Unity

Feedback Even more comments about UTF documentation

Discussion in 'Testing & Automation' started by liortal, Oct 28, 2019.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Hey @Warnecke , here are some more comments about the documentation:

    1. In https://docs.unity3d.com/Packages/com.unity.test-framework@1.1/manual/index.html
    Minimal supported version is listed as 2019.2, but i don't think this is correct (see my other thread).

    Broken links

    2. In https://docs.unity3d.com/Packages/com.unity.test-framework@1.1/manual/reference-command-line.html
    There's a broken link (404) in the bottom of the page (i actually used a chrome extension called "check my links", really useful for verifying such things):

    upload_2019-10-28_23-24-9.png

    3. In https://docs.unity3d.com/Packages/c...1/manual/reference-actions-outside-tests.html
    Link to UnityTest is broken (404)
    upload_2019-10-28_23-24-28.png
    4. Escaped characters (e.g: &lt and &gt) on the left side (under "References"):

    upload_2019-10-28_23-24-49.png

    5. In https://docs.unity3d.com/Packages/c...al/workflow-run-playmode-test-standalone.html
    The title is "Workflow: How to run a Play Mode test in player"
    but on the left side it is shown as "How to run a Play Mode test as standalone"

    6. Edit mode vs play mode tests
    https://docs.unity3d.com/Packages/c...@1.1/manual/edit-mode-vs-play-mode-tests.html

    The descriptions on this page are still not accurate IMHO (i think i already said it in a different thread in the past).

    Example:
    "With Edit Mode tests it is possible to test any of your Editor extensions using the UnityTest attribute. For Edit Mode tests, your test code runs in the EditorApplication.update callback loop."

    This is really the first explanation about these tests, so i wouldn't start with UnityTest or editor extensions. edit-mode tests can pretty much test anything, so long as you don't rely on the play loop or play mode to be active. So it's really not about editor extensions or the update callback loop.

    I would go with something like this (not perfect but i believe you could improve on this...):
    "With Edit mode tests it is possible to test any code that does not rely on running in play mode. For example - plain old C# classes that don't need the engine to run in play mode, or even editor extensions".

    Example 2:
    "You can run Play Mode tests as a standalone in a Player or inside the Editor. Play Mode tests allow you to exercise your game code, as the tests run as coroutines if marked with the UnityTest attribute."

    This is also, the very first paragraph that discusses play mode tests. the test don't run as coroutines, although you do have the option to run them in that mode. this phrasing over complicates things for a reader that has no knowledge about this yet.

    Example 3:
    "The test assembly should reference an assembly within the code that you need to test."
    i believe you meant "with the code" and not "within" ?


    In https://docs.unity3d.com/Packages/c...1.1/manual/workflow-create-playmode-test.html

    Under "References and builds"
    The whole paragraph is not clear to me... (sorry...)

    Link to "https://docs.unity3d.com/Packages/c...tml#split-build-and-run-for-player-mode-tests"

    the anchor doesn't exist (link is from the left side item "how to split the build and run...")


    That's it so far :) reading through the whole thing as there are more advanced things i am not familiar with ! :)
     
  2. Warnecke

    Warnecke

    Unity Technologies

    Joined:
    Nov 28, 2017
    Posts:
    92
    Thanks for the thorough feedback. I'll look into applying it and improving on it. :)
     
    liortal likes this.
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
  4. Warnecke

    Warnecke

    Unity Technologies

    Joined:
    Nov 28, 2017
    Posts:
    92
    The forgetProjectPath argument is an argument that can be used in addition to projectPath. forgetProjectPath ensures that the project does not show up in the list of recent projects after the run.

    I'll get runTests corrected
     
    liortal likes this.
  5. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    (Sorry for hijacking the thread but that's not my intention) can we use UTF in final build for automation?
     
  6. Warnecke

    Warnecke

    Unity Technologies

    Joined:
    Nov 28, 2017
    Posts:
    92
    Do you mean if you can run utf tests as part of your build?
     
  7. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    i think he meant if he can include the tests in his "real" builds.