Test harnesses are pre-built testing applications that demonstrate OASIS functionality and provide working examples for alpha testers. Each test harness focuses on specific components and use cases.
This guide provides comprehensive information for using OASIS test harnesses effectively. Start with the basic functionality tests and gradually move to more advanced scenarios.
cd holochain-client-csharp/NextGenSoftware.Holochain.HoloNET.Client.TestHarness
dotnet run
using NextGenSoftware.Holochain.HoloNET.Client.TestHarness;
// Run specific test
await HoloNETTestHarness.TestHoloNETClientAsync(TestToRun.WhoAmI);
// Run OASIS-specific test
await HoloNETTestHarness.TestHoloNETClientAsync(TestToRun.SaveLoadOASISEntry);
cd "STAR ODK/NextGenSoftware.OASIS.STAR.TestHarness"
dotnet run
# Navigate to test harness directory
cd NextGenSoftware.OASIS.API.ONODE.Core.TestHarness
# Run with default configuration
dotnet run
# Run with specific configuration
dotnet run --configuration Release
# Run with custom parameters
dotnet run -- --test-type nft-minting --provider ArbitrumOASIS
# Run multiple test harnesses
cd NextGenSoftware.OASIS.API.ONODE.Core.TestHarness && dotnet run
cd ../NextGenSoftware.OASIS.API.Providers.ArbitrumOASIS.TestHarness && dotnet run
cd ../../STAR\ ODK/NextGenSoftware.OASIS.STAR.TestHarness && dotnet run
using NextGenSoftware.OASIS.API.ONODE.Core.TestHarness;
public class CustomTestRunner
{
public async Task RunAllTests()
{
var testHarness = new ONODECoreTestHarness();
// Run specific tests
await testHarness.TestNFTMinting();
await testHarness.TestAvatarOperations();
await testHarness.TestProviderSwitching();
await testHarness.TestDataOperations();
}
}
using NextGenSoftware.OASIS.API.Providers.ArbitrumOASIS.TestHarness;
public class ArbitrumTestRunner
{
public async Task RunArbitrumTests()
{
var testHarness = new ArbitrumTestHarness();
await testHarness.TestContractDeployment();
await testHarness.TestNFTMinting();
await testHarness.TestTransactionHandling();
}
}
# Set debug environment variable
export OASIS_DEBUG=true
# Run test harness with debug logging
dotnet run -- --debug --verbose
public class TestDataCleanup
{
public async Task CleanupTestData()
{
// Clean up test avatars
await CleanupTestAvatars();
// Clean up test NFTs
await CleanupTestNFTs();
// Clean up test holons
await CleanupTestHolons();
}
}
public class LoadTestRunner
{
public async Task RunLoadTests()
{
var tasks = new List<Task>();
// Create multiple concurrent operations
for (int i = 0; i < 100; i++)
{
tasks.Add(CreateTestAvatar($"testuser{i}"));
}
await Task.WhenAll(tasks);
}
}