question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

We discussed both on Discord and in #40 about adding end to end tests. These tests would work as follows (let me know if I missed any step):

  • Create a new virtual environment
  • Install nile
  • Install cairo using nile install
  • Initialize a new repository with nile init
  • Compile the project
  • Run tests
  • Setup an account for the user (note: requires a private key)
  • Deploy smart contract
  • Use the account to interact with the smart contract
  • Read value back from smart contract

This series of commands tests everything available in nile except nile node, which could be tested by running all steps that involve a network interaction twice (with local node and with test network).

Since StarkNet does not have transaction fees for now we can generate a new private key every time we run the tests and then let the account rot (we can’t destroy it anyway).

Any thoughts?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
fracekcommented, Jan 11, 2022

I think we have everything except we don’t test interactions between node and nile. I think that’s fine since we would be testing starknet-devnet more than nile itself.

1reaction
martriaycommented, Dec 25, 2021

I’m curious about the reason for having nile install to install cairo-lang and starknet-devnet, instead of including those in the installation requirements. The second option would avoid needing tests (that set up a virtual environment etc), but I’m sure there’s a design decision that I’m not aware of:)

The reason is that back in the day installing Cairo wasn’t as easy as pip install cairo-lang, so an utility for installing was useful – moreover with a new Cairo version every two weeks. I still believe there’s value in setting up a whole environment from scratch, although we have nile init for that.

Agree with everything else, although if we can avoid adding docker as a requirement I’d vote for it. Reasons being dependency minimization and that I already work on a docker environment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is End-to-End Testing? | E2E Testing Tools - Katalon
End-to-end testing is a technique that tests the entire software product from beginning to end to ensure the application flow behaves as expected....
Read more >
What is end-to-end testing? | CircleCI
End-to-end testing, also known as E2E testing, is a methodology used for ensuring that applications behave as expected and that the flow of ......
Read more >
What Is End-To-End Testing? - SmartBear
End-to-end testing is a methodology used in the software development lifecycle (SDLC) to test the functionality and performance of an application under product- ......
Read more >
What is END-To-END Testing? E2E Example - Guru99
END-TO-END TESTING is a type of Software Testing that validates the software system along with its integration with external interfaces.
Read more >
Don't Do E2E Testing! - YouTube
End-to-end testing is one of the more common approaches to testing software, but it is complex, fragile expensive and low quality.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found