Comments (6)
@davidiw , @JoshLind - Thanks a lot for the feedback. Mock testing in my experience is more suitable for unit tests that are well contained in a class - it is not so well suited for integration testing like scenarios. Also, I don't want us to rewrite a bunch of already written tests just for the sake of bringing in the mock testing framework - that is definitely not the best use of our time. However, I definitely see a great value in using a mock testing framework going forward to make it easier for us to add unit tests. How about we can introduce the framework as a part of existing projects and transitioning any existing tests can be a lower priority for us?
from aptos-core.
Yes, I plan to play around the library as a part of fine-grained storage project and see if we can standardize that library across our code base.
from aptos-core.
Interesting proposal! I'd be curious if you could make this into more a first project. For example, the MockSharedMempool is complex code that actually wraps around other dependencies for testing them out, for example the CoreMempool. Is it also testing out other facilities? It isn't super clear to me just from looking at it. I would love to get rid of this hard to read "mock" code. I guess the question is ... if it is a unit test use mocks. if it is an integration test ... ?
from aptos-core.
@sitalkedia, yeah, this is something I brought up a while back (1+ years ago):
- The feeling I got at the time was that it's easier/quicker for most folks to roll their own mocks than rely on the libraries that existed back then. I know there's been a bunch of progress made in these libraries since, so perhaps they might better fit the purpose now.
- This definitely seems like something that might help improve the quality/readability of our code, but it's also worth calling out that most of the manual mocks that exist today provide just enough functionality to test what the author wanted. So, I think if we did start migrating things, we'd need an end goal that justifies the work. For example, if we're just porting for the sake of it, it's probably not worth it. But, if we can show that we're getting better test coverage, debuggability, etc., then it could be argued this is a good use of time.
from aptos-core.
How about we can introduce the framework as a part of existing projects and transitioning any existing tests can be a lower priority for us?
Sure, makes sense to me. 😄 It's worth noting that most folks will probably do what suites them best though, so you may need to convince someone to try it out (making these types of things mandatory before there is a clear standard tends to result in negative outcomes). Alternatively, you could be the one to experiment and see how it goes! Either way, it would be good to get some exposure to these libraries to see how well they support our codebase.
from aptos-core.
This issue is stale because it has been open 45 days with no activity. Remove the stale
label or comment - otherwise this will be closed in 15 days.
from aptos-core.
Related Issues (20)
- [Feature Request][compiler-v2] Tracking various potential compiler optimizations that we may want to implement
- [Feature Request][Coverage tool] Improve usability of the Aptos move coverage tool
- [Bug][Compiler-v2] handling dummy_field in V2 is problematic
- [Feature Request] RPC Support for Full Node access without trust assumptions
- [Bug][Compiler-v2] false positive `cannot mutably borrow since immutable references exist` when function returns a tuple containing both immutable and mutable references HOT 1
- [Bug] [v1.13.1] Aptos Fullnode's synchronization consistently fails. HOT 11
- [Bug] failed to get BCS block with rust rest sdk HOT 1
- [Bug] High gas consumption observed when creating transactions with multisig_account V2 HOT 2
- [Bug] vector of constant addresses is not treated as a constant
- [Feature Request][move-compiler-v2] recognize potential stack overflow before verification stage HOT 1
- [Bug] Compiler message could be nicer for missing commas in structs
- [Feature Request][move-compiler-v2] aptos-api needs to be tested with move-compiler-v2
- [Bug] Ledger key fails to sign the upgrade of a multisig contract for some packages HOT 1
- [Bug][move-compiler] move_pr.sh script is broken if git-nextest is an old version HOT 1
- [Feature Request]
- [Bug][move-compiler-v2] move-model AST represents short-cut `||` and `&&` as simple Calls, check for potential errors HOT 1
- [Feature Request] Improve Simulation for Sponsored Transactions
- [Bug][move-compiler-v2] MOVELOC_UNAVAILABLE_ERROR related bugs raised by V2 HOT 1
- [Bug][compiler-v2] compilation result is different when there is a public friend entry inline function HOT 2
- [Bug][move-compiler-v2] It's likely that V2 includes `#[verify_only]` stuff (including use and friend decls) during compilation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aptos-core.