-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Testengine executable #365
Conversation
…ne in Neo.Compiler.MSIL.UnitTests dependencies
@@ -8,7 +8,7 @@ | |||
[assembly: InternalsVisibleTo("Neo.SmartContract.Framework.UnitTests")] | |||
namespace Neo.Compiler.MSIL.UnitTests.Utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change namespace?
src/TestEngine/Program.cs
Outdated
} | ||
else | ||
{ | ||
result = BuildJsonException("One or more arguments are missing"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Show an example?
src/TestEngine/Helper.cs
Outdated
var json = new JObject(); | ||
|
||
json["vm_state"] = testEngine.State.ToString(); | ||
json["gas_consumed"] = (new BigDecimal(testEngine.GasConsumed, NativeContract.GAS.Decimals)).ToString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We agreed to use gasconsumed
format in json properties
src/TestEngine/Helper.cs
Outdated
return json; | ||
} | ||
|
||
public static JObject ToJson(this DataCache<StorageKey, StorageItem> storage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to initialize the storage, for fake balances for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently working on this
src/TestEngine/Program.cs
Outdated
|
||
if (!success) | ||
{ | ||
// if something went wrong while reading the json, inserts null in this argument position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
show log or break the execution, it could produce test mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping
2b50f6e
to
ba806a1
Compare
Add json test support to the TestEngine
Include storage values in the TestEngine arguments
Include other smart contracts in the TestEngine arguments
Increase block height in the TestEngine
0d423f9
to
0c1303e
Compare
Make the TestEngine a global dotnet tool (similar to neoxp)
FYI, NGD Enterprise is working on a similar project that is integrated into the blockchain toolkit: https://github.com/ngdenterprise/neo-test/tree/devhawk/test-runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we continuing to make updates to this PR instead of https://github.com/ngdenterprise/neo-test/tree/main/src/runner
fdc6141
to
81c6782
Compare
81c6782
to
c2ef0ae
Compare
Created an executable for the TestEngine to allow other Neo compilers, even those that aren't written using C#, to run their tests with the same executing engine as the C# compiler.