We’ve connected Unity Cloud Build with Bitbucket to create a build and run tests for each pull request. Build Confidence & Self Esteem Overcome Fear of Failure. You can event set to fail the build if tests don’t pass (we do that). It is possible to run tests in Unity Cloud Build. The best you can do is to run the tests every time you make any change (i.e., before committing the changes). If you spend time to create automated tests, you need to run them. So always consider what and how much detailed you need to test. Some tests might be too complicated, so writing and maintaining them would cause you to waste more time than they would save you. Once you are finishing the features, you can write more thorough tests. It is better to have a few simple tests early when you are still changing a lot of things in the game.
When you change something in the game, you need to change the corresponding tests. It is important to realize that writing tests take time not only to write them initially but also to maintain them. If you run all tests it failed, which was quite complicated to debug. And then we had one that got broken by that. After that test, we have a few more that were not affected by that change. The problem was that during the test, Time.timeScale was changed to 0. Currently I'm wondering if there's any way at all to get Unity Cloud Build working for a > 10 GB project (which is very common for gamedev). GitHub and Bitbucket offer data packs, but only for Git LFS projects, and Plastic's Git Sync feature does not support Git LFS. We had a bug in our tests where we tested game pause. GitLab is limited to 10GB and cannot be increased. Otherwise, you might face tricky bugs in your tests. If you change Time.timeScale during one test, well, it is kept changed for all the tests that run afterwards. Therefore, it is essential to make sure they are set up as expected before we run the test.
The problem is that they keep their state between tests. SingletonsĮven though we all know that Singletons are usually considered a bad practice, we might still have some in our code. And if you forget to clean up somewhere, it might break a different test. However, it is better to make sure everything is as expected before you run the test because otherwise, you rely on other tests to clean up after themselves. You can use TearDown to clean up after the test.
Use SetUp methods to prepare the test environment. opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.General Tips Prepare the Environment Before the Test opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.log -projectPath $(pwd)-buildOSXUniversalPlayer "$(pwd)/Build/osx/GameTest.app" -quit opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.log -projectPath $(pwd) -buildWindowsPlayer "$(pwd)/Build/windows/GameTest.exe" -quit I've added my gitlab-ci.yml: image: ubuntu The setuid sandbox provides API version 1, but you need 0Īs I can see in the Unity Cloud Build platform they are using a MacOS system in order to build, do we have this alternative in GitLab CI (cloud service) ? Log line from Unity Cloud Build: 42: + Building with Unity installed at /UNITY_PATH/Unity/Unity-2017_2_1f1/Unity.app/Contents/MacOS/Unity That sandbox development is marked as deprecated, what am I missing here?.Īpart from that when I try to get the help of chrome-sandbox I get the following: $ /opt/Unity/Editor/chrome-sandbox -help Running without the SUID sandbox! See for more information on developing with the sandbox on. buildLinuxUniversalPlayer "./Build/linux/project" -quit I am getting the following error but I have not found useful information over there: $ /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile. I have been trying several ways of making an Unit圓D build from an Ubuntu image by using a Gitlab CI container but seems to fail all the times (Ubuntu 16.04.3 LTS).