Hello,
When turning on tests from Unity cloud builds, I am experiencing failures when I am not experiencing them on local machines (both Windows and Mac).
Example:
Locally when asserting on material color of that has a Hex value of BAEF19 works fine however when the same test runs on the cloud the Hex value is actually B3EC04.
Is this a known issue?
This is not currently a known issue. Please can you log a support ticket with supporting reproduction information via the Cloud Build Developer Dashboard so that we can take a closer look at your project?
Here is the cloud build failure:
GivenFluorineWhenAtomIsRenderedThenColorIsFlourenceYellow
String lengths are both 6. Strings differ at index 1. Expected: "BAEF19" But was: "B3EC04" ------------^
at Tests.AtomTests+<GivenFluorineWhenAtomIsRenderedThenColorIsFlourenceYellow>d__6.MoveNext () [0x00073] in WORKSPACE_PATH/Assets/PlayModeTests/AtomTests.cs:91 at UnityEngine.TestTools.TestEnumerator+<Execute>d__5.MoveNext () [0x0004c] in WORKSPACE_PATH/Library/PackageCache/com.unity.test-framework@1.0.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs:31
Here is the test
UnityTest]
public IEnumerator GivenFluorineWhenAtomIsRenderedThenColorIsFlourenceYellow()
{
yield return null;
var sut = GameObject.Find("Fluorine");
var actualColor = sut.GetComponent<MeshRenderer>().material.color;
var actual = ColorUtility.ToHtmlStringRGB(actualColor);
Assert.That(actual, Is.EqualTo("BAEF19"));
}
Attached is the test seen through the editor
