Skip to content

extreal-dev/Extreal.Integration.AssetWorkflow.Addressables.Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extreal.Integration.AssetWorkflow.Addressables.Test

How to test

Initialization

  1. Enable Hosting in Addressables Hosting window (Window > AssetManagement > Addressables > Hosting).
    • If Hosting is unable to be enabled, change port number and repeat this operation again.
  2. Build asset bundle
    1. Remove all files except .gitignore in ServerData/StandaloneWindows64/ and ServerData/Save/, If there are files in the directory.
    2. Run Build > New Build > Test Encrypt Build Script in Addressables Groups window (Window > AssetManagement > Addressables > Groups).
    3. Remove the file whose name begins with "acquisition".
    4. Move all files except .gitignore in ServerData/StandaloneWindows64/ to ServerData/Save/
    5. Change the color of CubeMaterial in Assets/Tests/Materials/
    6. Run Build > New Build > Test Encrypt Build Script in Addressables Groups window again.
    7. Remove the file whose name begins with "acquisition".
  3. Change Play Mode Script in Addressables Groups to Use Existing Build (Windows).
  4. If using Unity 2022.x, change Project Settings > Player > Other Settings > Allow downloads over HTTP to Always allowed

Code coverage measurement

  1. Check that Hosting is enabled and go back to Initialization if it is disabled.
  2. Run Extreal.Integration.AssetWorkflow.Addressables.Test.dll in Test Runner window.
  3. Completed all tests.

Remote test

"Xxx" is "Crypto" or "Origin".

  • If Hosting is enabled, the "LoadAssetFromRemoteXxx" test succeeds.
  • Otherwise, LoadAssetFromRemoteXxx fails.
    • The "LoadAssetFromLocalXxx" test and the "LoadAssetFromLocalUsingUwr" test succeed whether Hosting is enabled.

Watch the source code

Check the source code around the asserted log content for the following tests.

  • CryptoAssetBundleResourceTest
    • LoadAssetWithAssetBundleCrcDisabled
    • LoadAssetWithAssetBundleCrcEnabledExcludingCached
    • LoadAssetWithAssetBundleCrcEnabledIncludingCached
    • LoadAssetWithHttpRedirectLimit
    • LoadAssetWithoutHttpRedirectLimit

Retry test

Since it is difficult to control the Hosting Service from the test code, retries are tested manually. Retry tests should be tested by executing the following test methods individually to toggle Enable of the Hosting Service.

  • AssetProviderTest
    • Download
    • LoadAssetWithAssetNameSuccess
    • LoadSceneSuccess