NextGenSoftware.Holochain.HoloNET.Client.TestHarness
2.2.0
See the version list below for details.
dotnet add package NextGenSoftware.Holochain.HoloNET.Client.TestHarness --version 2.2.0
NuGet\Install-Package NextGenSoftware.Holochain.HoloNET.Client.TestHarness -Version 2.2.0
<PackageReference Include="NextGenSoftware.Holochain.HoloNET.Client.TestHarness" Version="2.2.0" />
paket add NextGenSoftware.Holochain.HoloNET.Client.TestHarness --version 2.2.0
#r "nuget: NextGenSoftware.Holochain.HoloNET.Client.TestHarness, 2.2.0"
// Install NextGenSoftware.Holochain.HoloNET.Client.TestHarness as a Cake Addin #addin nuget:?package=NextGenSoftware.Holochain.HoloNET.Client.TestHarness&version=2.2.0 // Install NextGenSoftware.Holochain.HoloNET.Client.TestHarness as a Cake Tool #tool nuget:?package=NextGenSoftware.Holochain.HoloNET.Client.TestHarness&version=2.2.0
HoloNET Test Harness
Test Harness for HoloNET Holochain Client.
https://github.com/holochain-open-dev/holochain-client-csharp
https://github.com/NextGenSoftwareUK/holochain-client-csharp
You need to clone the following repo: https://github.com/holochain/happ-build-tutorial
And follow the instructions here: https://github.com/holochain-open-dev/wiki/wiki/Installing-Holochain--&-Building-hApps-Natively-On-Windows
Once you have Holochain setup on your machine and got the example hApp ready above, you need to copy it into a hApps folder in the root of the output folder (Debug or Release) where you installed this Test Harness package. HoloNET will be looking for it there.
The Test Harness sets the paths to the test hApp you compiled above using the following lines:
_holoNETClient.Config.FullPathToRootHappFolder = string.Concat(Environment.CurrentDirectory, @"\hApps\happ-build-tutorial-develop");
_holoNETClient.Config.FullPathToCompiledHappFolder = string.Concat(Environment.CurrentDirectory, @"\hApps\happ-build-tutorial-develop\workdir\happ");
If you wish to run the OASIS test (real world use case saving and loading an entry) then you will need to clone this repo:
https://github.com/NextGenSoftwareUK/OASIS-Holochain-hApp
The Test Harness will set the paths to the OASIS hApp you compiled above using the following lines:
_holoNETClient.Config.FullPathToRootHappFolder = string.Concat(Environment.CurrentDirectory, @"\hApps\OASIS-Holochain-hApp");
_holoNETClient.Config.FullPathToCompiledHappFolder = string.Concat(Environment.CurrentDirectory, @"\hApps\OASIS-Holochain-hApp\zomes\workdir\happ");
Finally, from within your app simply call the following method:
using NextGenSoftware.Holochain.HoloNET.Client.TestHarness;
await HoloNETTestHarness.TestHoloNETClientAsync(TestToRun testToRun);
You can pass in one of these values:
Test | Description |
---|---|
WhoAmI | Will call zome function whoami on the whoami zome (part of the happ-build-tutorial above). |
Numbers | Will call zome function add_ten on the numbers zome (part of the happ-build-tutorial above). |
Signal | Will call zome function test_signal_as_string on the oasis zome. |
SaveLoadOASISEntryWithTypeOfEntryDataObject | Will call the zome function create_entry_avatar on the oasis zome and once it receives the ActionHash back from the Holochain Conductor, it will load that entry using get_entry_avatar zome function (part of the OASIS hApp above). It will then map the data returned onto a new instance of the type passed in to CallZomeFunction function. See main HoloNET README for more info... |
SaveLoadOASISEntryWithEntryDataObject | Will call the zome function create_entry_avatar on the oasis zome and once it receives the ActionHash back from the Holochain Conductor, it will load that entry using get_entry_avatar zome function (part of the OASIS hApp above). It will then map the data returned onto the object passed in to CallZomeFunction function. See main HoloNET README for more info... |
SaveLoadOASISEntryUsingSingleHoloNETAuditEntryBaseClass | Will test the new HoloNETAuditEntryBaseClass by extending it with the Avatar class. It will call create_entry_avatar, get_entry_avatar, update_entry_avatar & delete_entry_avatar on the oasis zome and verify the results are as expected. This version will instantiate its own internal HoloNET Client to make calls to the Holochain Conductor. |
SaveLoadOASISEntryUsingMultipleHoloNETAuditEntryBaseClasses | Will test the new HoloNETAuditEntryBaseClass by extending it with the AvatarMultiple & Holon class. It will call create_entry_avatar, get_entry_avatar, update_entry_avatar & delete_entry_avatar on the oasis zome and verify the results are as expected. This version passes in a HoloNETClient instance that is shared between the AvatarMultiple & Holon classes. |
LoadTestNumbers | Will call zome function add_ten on the numbers zome 100 times (part of the happ-build-tutorial above). |
LoadTestSaveLoadOASISEntry | Will call SaveLoadOASISEntry test 100 times (part of the OASIS happ above). |
You can also view the full source and run the Test Harness (and edit to suit your needs etc) here:
https://github.com/holochain-open-dev/holochain-client-csharp/tree/main/NextGenSoftware.Holochain.HoloNET.Client.TestHarness
NuGet Package:
https://www.nuget.org/packages/NextGenSoftware.Holochain.HoloNET.Client.TestHarness
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- NextGenSoftware.Holochain.HoloNET.Client (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.4 | 98 | 5/26/2024 |
3.0.3 | 118 | 5/5/2024 |
3.0.2 | 127 | 4/19/2024 |
2.2.0 | 200 | 5/22/2023 |
2.1.4 | 187 | 4/27/2023 |
2.1.3 | 230 | 4/2/2023 |
2.1.2 | 266 | 3/18/2023 |
2.1.0 | 281 | 2/6/2023 |
2.0.2 | 310 | 1/2/2023 |
2.0.1 | 291 | 12/29/2022 |
2.0.0 | 283 | 12/28/2022 |
1.3.1 | 420 | 10/7/2022 |
1.3.0 | 408 | 10/7/2022 |
1.2.0 | 389 | 10/6/2022 |
1.1.1 | 375 | 9/29/2022 |
1.1.0 | 425 | 9/29/2022 |
1.0.2 | 440 | 8/24/2022 |
1.0.1 | 441 | 8/24/2022 |
1.0.0 | 425 | 8/23/2022 |
This release includes multiple bug fixes and improvements such as now being able to pass in additional custom params (that will be passed to your zome functions in your hApp rust code) to all Load/LoadAsync and Delete/DeleteAsync methods in HoloNETEntryBassClass and HoloNETAuditEntryBassClass derived classes.
It also allows the version to be specified in all Load/LoadAsync methods in HoloNETAuditEntryBassClass derived classes. If version is 0 (default), it will load the latest.
The non reflective Save/SaveAsync methods (you pass in your own paramsObject) in HoloNETAuditEntryBassClass derived classes now have the same auditing capabilities as their reflective cousins (auto generates the dynamic paramsObject from the properties (that have the HolochainFieldName attribute defined) defined in the derived classes). This upgrade is also fully customisable so for instance the audit param names defined in your rust zome function in your hApp can be overridden if you desire.
There is also a BIG performance improvement in this release with the upgrade to the latest .NET version (7) which features many improvements such as security and performance. This is the fastest .NET yet! Check out these links for more info:
https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-7
https://devblogs.microsoft.com/dotnet/performance_improvements_in_net_7/
https://devblogs.microsoft.com/dotnet/dotnet-7-networking-improvements/
https://devclass.com/2022/09/01/faster-net-in-version-7-500-performance-improvements-detailed/
Finally, the README/documentation has been updated and fixes have been made to the links/TOC and more...
*Full Changes Below:*
https://github.com/holochain-open-dev/holochain-client-csharp/commit/83bc3beb71eb714805b02c1250ba600049372f2b
- Added useReflectionToMapKeyValuePairResponseOntoEntryDataObject param to SaveAsync and Save override methods in Avatar class in HoloNET Test Harness.
https://github.com/holochain-open-dev/holochain-client-csharp/commit/73100761371ba0a7950abc1be1af409c8c38fec2
- Added missing useReflectionToMapKeyValuePairResponseOntoEntryDataObject param to SaveAsync/Save methods in Avatar test object in HoloNET Test Harness.
https://github.com/holochain-open-dev/holochain-client-csharp/commit/05eebdcb3e4b4e4a5cb49706c2236ac7ea825cf6
- Updated HoloNET Test Harness Release Notes.
- Bumped HoloNET Test Harness to v2.2.0.
*Full Changelog:* https://github.com/holochain-open-dev/holochain-client-csharp/compare/v2.1.4...v2.2.0