Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Unit tests for systems, jobs and aspects for DOTS 1.0

Discussion in 'Entity Component System' started by alen83310, Jan 4, 2023.

  1. alen83310

    alen83310

    Joined:
    Apr 4, 2020
    Posts:
    10
    Is there any working example how to make unit tests for systems, jobs and aspects?

    Ideally I would like to create some test entities with components, define what system I would like to run once, and at the end I should be able to check if entities are in desired state.

    For aspects I would like to also check that methods did change component data properly.
     
  2. joepl

    joepl

    Unity Technologies

    Joined:
    Jul 6, 2017
    Posts:
    87
    We ship much of our tests as part of the package. If you look in Unity.Entities.Tests (or include that entities as a testable package in your project), you should be able to run and view a number of systems, jobs and aspect tests.
     
    kynphlee likes this.