Skip to content

cvera08/blockchain-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blockchain-automation

Blockchain base automation project using: Cypress - JavaScript - REMIX - Ethereum IDE to automate Solidity Smart Contracts.


Table of contents


Getting started

1. Install Git locally


You can follow one of these links:
Option Link Command
Windows, Linux, Mac https://git-scm.com/book/en/v2/Getting-Started-Installing-Git use the previous link depending on your OS
Homebrew https://www.atlassian.com/git/tutorials/install-git brew install git

2. Install Node locally


You can follow one of these links:
Option Link Command
Windows, Linux, Mac https://nodejs.org/en/download/current use the previous link depending on your OS
Homebrew https://www.atlassian.com/git/tutorials/install-git brew install node
NVM https://github.com/nvm-sh/nvm brew install nvm

Node recommended Version: Latest.
For Example, if you are using nvm, you can run:

nvm install node


Configure this project

Open your console/terminal and run this:

cd </your/desired/project/path/>
git clone https://github.com/cvera08/blockchain-automation.git

drawing

cd blockchain-automation
npm i

Quick run

Please follow to this section ▼


Run tests in UI/GUI mode

By using your console/terminal, make sure you are in the right path and run this:

cd </your/desired/project/path>/blockchain-automation
npx cypress open

// HINT: if the above command does not work for you, try this one instead:

./node_modules/cypress/bin/cypress open --e2e


After this:

  • You may select "E2E Testing" (if it is not displayed is fine),
  • Choose a browser (it will grab your local browser installations, you can choose Electron or any of them),
  • Click "Start E2E Testing in <yourSelectedBrowser>".

Now you are able to run the test/s by clicking on any .cy.js file.
After you clicked on your desired spec file Cypress will start automatically the execution and after a while you will see the output results.

// Once you are done with the execution, you can type ctrl+c in your terminal or close the browser runner and cypress window.

Demo open/GUI mode:

Troubleshooting GUI mode:

If you face some error you need to be sure you are in the base project folder (blockchain-automation) and run 'npm install' again (make sure not to have errors or fix them according to the printed help).

npm install

If it still does not work, try restarting all the involved programs (like Cypress/VS Code/etc), even your computer if it is necessary and start over again.


Run tests in Headless mode (with video output to see the recording)

cd </your/project/path>/blockchain-automation
npx cypress run

// HINT: if the above command does not work for you, try this one instead:

./node_modules/cypress/bin/cypress run

You will get something like this:

headless


Different ways to use Cypress

Make sure you already are located on your project path before trying to run one/many of the following commands.

cd </your/project/path>/blockchain-automation

They are ALL going to pursue the same goal:

./node_modules/.bin/cypress open

$(npm bin)/cypress open

npx cypress open

yarn run cypress open


Miscellaneous

N/A.


Primary Authors

  • Carlos Vera

    @cvera08 is the current creator and maintainer of the code and has written much of the current code base, including complete refactors, bug fixing and general improvements to the existing code base. He started out by authoring many, if not all, of the available e2e automation test cases, has been assisting with maintenance and adding project documentation.


Other Contributors

N/A.


MIT license

Copyright (c) 2023 Carlos Vera

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Change Log

Stable Builds:

  • Jan 21, 2023 -- v2.9.0

    • Deploy & Run Transactions Menu.
    • Delete First Contract.
    • Add New Smart Contract.
    • Create Hot Fudge Sauce Contract.
    • Compile Contract.
    • Deploy Contract.
  • Jan 5, 2023 -- v2.0.0

    • Deploy & Run Transactions.
  • Jan 3, 2023 -- v1.0.0

    • Initial Cypress Project.

About

Cypress - Remix (Ethereum IDE)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published