Dappeteer vs Synpress

You asked you got it !! JK πŸ˜‚ , this was in my backlog for a long time and finally had time to write something about it. This literally summarises my life:

Not many people out there talking about Blockchain Tests, maybe Oleksandr Romanov and Rhian Lewis, so I usually resource to communities (Web3Tests, Synpress…) to see what others are doing.

It is a bit shocking as there are many well-known attacks in this technology and on top of that after deploying something to the Blockchain you can’t go back (immutability feature), so how come this phase is so neglected as making sure everything is alright is so crucial ?

I am doing a quick benchmark about the End-to-End Tests Web3 Frameworks that are out there, and yes you can always mock the Web3 and then you don’t rely on third party integrations, which you would do any Web2 application already. But hey, this is one option to use when you need it !

Here it is what I got from the two major and most popular tools to test Web3 Apps (DApps):

CriteriaSynpressDappeteer
Platform & Application SupportWeb3 applications (Dapps)Web3 applications (Dapps)
Supported TechnologiesTypeScript, JavascriptTypeScript, Javascript
Wallets supportedMetaMaskMetaMask snaps, but probably is outdated.
Testing ScopeE2E TestsE2E Tests
Testing Framework IntegrationPlaywright (as a plugin)
Support for Cypress is coming soon.
Playwright (as a plugin)
Puppeteer (as a plugin)
Ease of Use & Learning CurveEasy learning curve, requires JavaScript/Typecript knowledgeRequires JavaScript/Typescript knowledge
Reporting & AnalyticsDetailed reports with dashboards and integrationsBasic reporting, may require additional tools
Ease of setupEasy to set up with Node.js, yarn and npmEasy to set up with Node.js, yarn and npm
Browsers– Chrome/Chromium (+ Edge, Opera, Brave, Chromium-based browsers)
– Firefox
– Webkit (Safari)
– Chrome/Chromium (+ Edge, Opera, Brave, Chromium-based browsers)
– Webkit (Safari)
Community & SupportLarge and active community, extensive documentation and supportSmaller community, growing resources and documentation
Cost & LicensingOpen source and free to useOpen source and free to use
Scalability & IntegrationHighly scalable, integrates with CI/CD pipelinesLess information available, may require custom integrations
AccessibilitySupports accessibility testing with pluginsInformation not available.
CustomizationHighly customizable with plugins and extensionsHighly customizable with plugins and extensions

Let me know in the comments which option you went for and how was your experience with it πŸ˜ƒ

Using AI to Accelerate Test Automation

Hello hello peeps πŸ‘‹

I have been a bit of a workaholic lately, but all for a good cause 😊

Not sure if you know already, but I started to work on a project The Chaincademy helping Developers (SDETs, Engineers, Coders, Programmers, Test Automation Engineers…), especially the junior ones that are coming to Tech to find their first job πŸ’»

We have launched our MVP before Xmas, and we are testing it with our audience (Junior Developers). So, in case you want to accelerate your career (for now, only web3) and get your first experience as a developer, sign up for our Newsletter to get access πŸŽ‰

First time I actually adventured myself with AI and Machine Learning was back in 2018 in a Machine Learning Workshop. I had to create this iOS app where AI was replacing my face with an emoji based on my expressions πŸ˜†β€‚Really simple, but back in that time, AI was not so good as it is right now (As we say in Brazil: Na minha Γ©poca isso aqui era tudo matoBack in my day, this place was all woods)

And since the launch of chatGPT to speed up all my work, I have been using AI on a daily basis, more Bard actually (Think it is much better than ChatGpt nowadays), so here I am going to give some tips on how I have been using it in test automation:

Test Automation

1. Test Case Generation:

  • Scenarios: You need to pass user stories and acceptance criteria, to generate corresponding test cases with detailed steps and expected outcomes.

    Prompt Example: Given a user tries to register with an invalid email address, describe the steps they would take and verify that the system displays an appropriate error message.
  • Edge Cases: Ask to suggest potential edge cases or corner scenarios to test, ensuring comprehensive coverage of your application’s functionality.

    Prompt Example: For the checkout process, what happens if the user's internet connection drops while entering their payment information? List potential scenarios and expected outcomes.
  • Data-Driven Testing: Generate test data sets based on specific criteria.

    Prompt Example: Generate 10 test cases for the login feature, covering cases with valid and invalid username/password combinations and different user types (admin, regular user).

2. Coding:

  • Test Script Automation: Describe the test actions:

    Prompt Example: I want to test clicking the 'Submit Order' button and verifying the order confirmation page appears. Write a Cypress with javascript script for this scenario.
  • Code Completion: Get test assertions, locator identification, and handling complex interactions.

    Prompt Example: In my Cypress test, I'm trying to assert that the element contains the text 'Welcome back'. Please suggest the next line of code with assertion syntax.
  • Refactoring: Analyze your existing test scripts and suggest improvements like removing redundancy, increasing reusability, or optimizing execution time.

    Prompt Example: Analyze my Pull request for the search functionality. Can you add comments and suggest ways to improve readability, reduce redundancy, and speed up execution?

3. Test Planning and Management:

  • Prioritization and Risk Assessment: Provide the test case details and application knowledge, so it can help prioritize tests based on risk or impact.

    Prompt Example: Given these 20 test cases for the new feature, rank them based on potential impact, speed of delivery and risk of failure. Explain your reasoning for each.
  • Maintenance: Identify outdated or irrelevant test cases and suggest updates or new tests to maintain coverage.

    Prompt Example: The application updated its login page layout. Identify test cases needing modification and suggest relevant updates based on the new UI.

4. Environment Management:

  • Mocks: Describe data needs for specific tests, and generate mock data or API responses, reducing reliance on real environments and dependencies. Remember you can also use contract tests (with Pact for example) and this can be done automatically from the code.

    Prompt Example: Generate mock API responses for the payment gateway integration test, simulating successful and failed scenarios based on test case requirements
  • Environment Configuration: Configurations for different test environments based on your application and testing requirements.

    Prompt Example: Suggest configurations for a staging environment replicating the production database but with limited user access. Include details for network settings and resource allocation.

Thanks to Abel from Graph Protocol πŸ‘ to send over these great resources that I have been using to learn about how to better prompt for Software Development are:

Equal Experts Geek Conference 2023

Hey guys, 4 months ago I had a 5 minutes lightning talk about How the QA will look like in the future at the Equal Experts Conference.

We went through the evolution of the role and how it is right now, then we quickly talk about the trends that are coming so you can already prepare yourself to be up to date πŸ™‚


In this 5-minute talk, we will quickly talk about the future of Quality Assurance (QA) position and discuss the evolution of the QA role in response to emerging trends.

The QA role has come a long way from its traditional focus on manual testing and bug detection. As technology advances, QA professionals are adapting to new demands and becoming integral contributors to the software development process.

TheΒ  future of QA position will be marked by AI Tests,Β  Tests in the Cloud, Web3 Tests, Alerting and Monitoring, along with strong soft skills. By embracing these trends and developing the necessary skills, QA professionals will be well-equipped to drive quality and innovation in the ever-changing software development industry.

Web3 Test Series: Rhian Lewis

Rhian Lewis

Rhian Lewis is a consultant software engineer and former digital journalist at The Times who is a regular international conference speaker and panellist on all things blockchain and cryptocurrency. She launched the altcoin portfolio tracker countmycrypto.com, co-founded the London Women in Bitcoin meetup group in 2014 and has acted as an advisor and strategist on various blockchain projects for the last seven years. She blogs on cryptocurrency and is the author of The Cryptocurrency Revolution (Kogan Page) and Understanding Decentralized Finance (Kogan Page). She is based near Plymouth, UK.

How can we test the performance and scalability of our DApp on Web3, especially when it comes to handling high volumes of transactions?

Testing dApps challenges many of our assumptions about testing, primarily the idea that we can provide a controlled test environment that closely mirrors Production. Of course. It is still important to adhere to all our good practices for the non-Web3 parts of the application: if we are making requests to APIs for the non-blockchain parts of the dApp or if the front end is complex, we would apply all the normal strategies and tools that we would apply for a standard Web 2.0 application.

However, as the back end for the dApp is effectively supplied by a public blockchain, our application can only be as scalable and performant as the underlying network itself. Choice of blockchain will influence our approach: we may opt to use a Layer 2 solution, for example, rather than directly using a blockchain like Ethereum.

But sometimes all the testing in the world can’t help you. There have been several instances where Ethereum has more or less ground to a halt where the system is under a lot of pressure, such as the doomed Bored Ape Yacht Club Otherside NFT drop. In cases like this, even the best designed dApp will fail to deliver: the role of the tester in this case is to have ensured that the behaviour of the dApp when the system is under such pressure is such that it communicates to users exactly what is happening and – as far as possible – attempts to conserve the current state so that transactions can happen later. So you should always ensure your tests cover the β€œvery unhappy path” scenario.

What tools and frameworks are available for testing smart contracts and other components of Web3 applications?

The good news is that we have a lot of choice when it comes to tools and frameworks, especially for automated tests. Most of these involve wrappers around existing test tools, or custom matchers for assertion libraries: for example, Waffle and Hardhat both provide their own versions of Mocha and Chai packaged with their one-stop development-test-and-deployment toolboxes.

Truffle, the original all-in-one Ethereum development solution, offers various choices for testing including the opportunity to run tests natively in Solidity with the `truffle test` command. Any of the frameworks I’ve mentioned could be used by someone with experience of JavaScript testing or development.

But there are also solutions based around Rust (Foundry) or Python (Brownie). Your choice of tools and language will, of course, be heavily influenced by the blockchain that your team are developing on top of and the smart contract languages that are used.

All of these I’ve mentioned are focused around testing smart contracts, but it’s also important to test the other elements that make up a dApp, including the front end. For that you could consider using Dappeteer, which is a fork of Puppeteer originally developed by the developers at Decentraland.

How can we ensure that our DApp is secure and resistant to attacks, such as denial-of-service (DoS) attacks, double-spending attacks, and others?

This is a very relevant question, when we consider the billions of dollars worth of value that has been stolen or lost from the ecosystem through hacks and bugs.There are some very simple things that developers can do to close some of the more common loopholes, such as using pre-existing secure libraries such as OpenZeppelin during development.

And there are various good security practices such as protocols around how private keys are stored and how any client funds are stored, which are not specifically the tester’s responsibility to ensure, but which are a whole-team responsibility that everyone should be involved in.

One of the most important things a tester can do is to think outside the box: if I was a hacker, how would I behave? Manual exploration and curiosity is your primary tool here.

I mention the importance of this because many of the so-called bugs that have happened in Web3 are not actually software bugs at all – they are bugs in the requirements caused by product owners failing to anticipate that people may use the application in a certain way. Many so-called exploits on DeFi exchanges have been traders simply using the smart contract as it was designed: it was just that no one anticipated they would be able to do this.

Most reputable teams will hire an audit team and also offer bug bounties to white-hat hackers because the level of complexity of smart contracts is such that the expertise needed to spot potential attack vectors goes far beyond what an average developer or tester can spot. However, we still need to rule out all the bugs we can reasonably find at an early stage of development so we are not paying specialists to find issues that could have been caught earlier.

What are some common bugs and vulnerabilities that can arise in Web3 applications, and how can we detect and address them?


If we look at a list of the biggest Web3 hacks and attacks, one thing that jumps out is the vulnerability of bridges, which are a special type of smart contract that enables value and information to be exchanged between blockchains. These are notoriously fragile – and should be approached with caution.

Another area to be aware of is issues caused by the existence of the mempool in Ethereum and Ethereum-like chains. When your transactions are public, and when there is a delay between your contracts becoming public and actually being written to the blockchain, you need to think very carefully about whether there is information there that could be exploited. Some of this may be legitimate, like MEV, but in some cases it can allow attackers to benefit from this knowledge.

In the last question, you mentioned the double spend problem, which is something that always needs to be guarded against. Using static analysis tools such as Slither is also really important for defining potential weaknesses in smart contracts.


How can we collaborate with other developers and testing experts to improve the quality and reliability of our Web3 applications since it is a bit of a wild west at the moment ?

I feel this is something that is really lacking in Web3 at the moment, especially when it comes to testers. Your Web3 testing community is definitely the sort of thing that will make a difference. The main issue is that the whole ecosystem is in its infancy, and many projects are so early-stage that they don’t even have test teams. I believe this will change organically over time, but in the meantime, communities like the one you are creating has a chance to shape the way we test dApps in the future.

What resources and communities are available for learning and collaborating on Web3 development?

Chainacademy, of course! And Web3 testing community. And I would also encourage people to check out the B9Lab Academy, with whom I have worked in the past. They have been around since 2014 and Elias, the co-founder, spoke at the very first Ethereum DevCon. They have a great Cosmos program running, among other courses. The Ethereum Foundation has a good list of links, and you should also look out for great developer relations people like Camila Ramos (Fuel Labs) and Nader Dabit (Lens), who have written a lot of excellent tutorials.

And finally, nothing beats getting your hands dirty building your own dApp, or even playing around with tools like Remix. The more people who get involved in this community, the better.

Thanks for the participation Rhian ! You rock 🀘

Web3 Tests Series

Hey there ! Are you ready to dive into the world of Web3 testing? We’re about to take a deep dive into the exciting and ever-evolving world of blockchain technology.

Web3, or the third generation of the internet, is a term used to describe a new era of the web that is focused on decentralization, security, and user privacy. Unlike the current web (Web2) which relies on centralized servers and applications, Web3 is built on decentralized technologies like blockchain and peer-to-peer networks.

This means that instead of relying on a central authority to manage and store data, Web3 relies on a network of users and nodes to collectively verify and manage transactions. This decentralization creates a more secure and transparent web, where users have more control over their data and can trust that their personal information is being handled safely.

One of the key technologies driving Web3 is blockchain. Blockchain is a decentralized ledger that records transactions across a network of computers, making it virtually impossible to hack or alter data. This makes it a perfect fit for Web3 applications, where security and transparency are essential.

Another important aspect of Web3 is the focus on user privacy. With the current web, users often have to sacrifice their personal data in order to use online services. But with Web3, users can maintain control over their data and choose what information they want to share.

Overall, Web3 is a promising new era for the internet that puts users back in CONTROL of their data and creates a more SECURE and TRANSPARENT web. From testing smart contracts to decentralized applications (dApps), there’s always something new to learn and explore.

So, if you’re a fellow Web3 enthusiast, or just someone who loves a good challenge, be sure to follow my upcoming posts. I’ll be chatting with some of the leading minds in the industry and sharing their insights.

Until then, join our Web3 Testing Discord Community or our Twitter and stay curiousπŸ”₯

Graphql Contract Testing with Lewis Prescott

It was an honour to participated on one of the episodes of Lewis Prescott Pactman podcast last month. We talked about contract testing and a blog post I have published some years ago (Excuse me my Alzheimer πŸ˜‚) and then we also touched a bit about web3 tests in the end. Check the episode and follow his podcast if you are interested on more contract tests content.

What the QA Position Will Look Like in the Future – TAU Conference

Hey guys, on 16th March I talked a bit about what the QA position will look like in the future on one of the Lightning Talks at Test Automation University Conference.

To watch the session on-demand recording just check out the link: applitools.info/6ob

A recurrent question is if AI is going to steal our jobs. I just want to remind you all we used to work in farms without any equipment, then machines came and some people stayed doing manual work and some others had to adjust themselves to still work in the farm. They had to learn to operate these machines.

What I mean is: It is a cycle. There is no need to panic! 😱 You will need to ADAPT and more important LEARN how you can improve your work using AI. There are many people sharing how you can do it and I will be sharing soon as well, just need to finish a research using ChatGPT haha

And yes there are new jobs already being created, for example: https://www.linkedin.com/jobs/view/3503646880/

Not everybody knows, but on that day I had my myopia laser surgery booked last minute and was rushing to go to the hospital, so apologise for being a bit all around the place ! I was panicking but not because AI is going to steal our jobs πŸ˜‚

ChatGPT approved seal:

Implement Synpress support methods in your Web3 tests

Hello guys,

Today I am going to post a quick and easy to use snippet with Synpress MetaMask support methods in your Web3 E2E (end-to-end) Test Project.

Create a base class to get the Synpress methods and extend it to use across the project. Here are some examples of methods that you can have:

export default class MetaMaskSupport {
  getCurrentNetwork() {
    return cy.getNetwork();
  }

 isMetamaskWindowActive() {
      return cy.isMetamaskWindowActive();
  }

  getMetamaskWalletAddress() {
    return cy.fetchMetamaskWalletAddress();
  }

  acceptMetamaskAccessRequest() {
    cy.acceptMetamaskAccess();
  }
}

Then you can either extend the class:

import MetaMaskSupport from '../metaMaskSupport';

export default class HomePage extends MetaMaskSupport {
  constructor() {
    super();
  }

  visit() {
    cy.visit('/');
  }

  waitUntilLoggedIn() {
    cy.waitUntil(() => {
      const walletAddress = this.getMetamaskWalletAddress();
      return walletAddress.should('exist');
    });
  }

  getLoggedInWalletAddress() {
    const walletAddress = this.getMetamaskWalletAddress();
    return walletAddress.invoke('text');
  }
}

Or you can instantiate as an object:

import MetaMaskSupport from '../metaMaskSupport';

export default class HomePage {
  constructor() {
    super();
    this.metaMaskSupport = new MetaMaskSupport();
  }

  visit() {
    cy.visit('/');
  }

  waitUntilLoggedIn() {
    cy.waitUntil(() => {
      const walletAddress = this.metaMaskSupport.getMetamaskWalletAddress();
      return walletAddress.should('exist');
    });
  }

  getLoggedInWalletAddress() {
    const walletAddress = this.metaMaskSupport.getMetamaskWalletAddress();
    return walletAddress.invoke('text');
  }
}

Now, get yourself a drink, you deserve it 🀣

2022 – End of the year learnings

Finally this year is over ! I have done a lot of things, mostly of them were solving problems that arose all of the sudden, but I’m mostly grateful for everything that I have been through, even the shit shows that happened. You know what people say, good times are great, but bad times help you to build character.

I finally was able to go to San Francisco Bay Area for an entrepreneurship course at Draper University that I’ve signed up for before the pandemic to focus on my new/old goal.

It has been a tornado of things to learn/refresh my mind, but here are some things that I took from this first week:

  • Never travel with tight connections. But when you do attach an airtag to your luggage! And in case your luggage gets lost, buy second hand or clothes that you can return.
    • Aer Lingus lost my bag during a connection in Dublin to San Francisco, it was 3 weeks without my clothes, not a really nice experience.
  • Everybody is in a different stage and journey in life, don’t feel demotivated by others. NO MATTER WHAT.
  • Keep learning (This is my every day reminder)
  • Make real connections with genuine good-quality people and life becomes more joyful even when things are difficult. Also, it is way easier to learn from people like this.
  • Observe and listen more than speak. (Every day reminder as well, but I am more a listener than a talker since I can remember)
  • Travelling by yourself is amazing (not new, but for all the people out there that are afraid to try, GO FOR IT)
  • Build your network independently if they are only virtual connections (for now) or not.
    • C’mon we have enough tools nowadays to allow us to drink some wine together with a friend on the other side of the world.
  • If you are at the beginning of your journey, look for mentorship and advice. Knowledge saves loads of time.
    • But be careful and look for real mentors, there are plenty of frauds around there.I can keep a healthy mindset in my old age to listen to others no matter their level. ❀️
  • Be a rebel ! (Another reminder, sorry mom haha)
  • Don’t wait too long and just do it, but also enjoy the journey.
  • Flying cars are real and they are available for sale already.
  • Don’t trust on those water-resisting plastic bags for your mobile ! The water is going to come inside even if you are in the shallow part !!
  • Have a dash cam on your car !
  • Have backups when you travel ! A backup phone and maybe even a paper with important phone numbers on your wallet (Don’t trust in tech that much)
  • Stay far from negative and prepotent people, but not too far. I believe they help you to build emotional intelligence, you have the power to decide if what they say is going to be the fuel for you to progress or if you are going to allow them to drag you down. Transform the judgemental comments into constructive feedback and ignore the rest.

And last just sharing my 360 review result, for all the people that have helped me with this, my big thanks. Looks like all this time interested in communication styles and human behaviour made me a more self aware person and I am not an asshole after all πŸ˜‚

Using openAI to create content for social media

Hello Hello πŸ‘‹πŸ‘‹πŸ‘‹

Today my post is a bit different from the others as I was having some fun with AI last weekend. I realised I was spending too much time thinking about the content, adding some fun emojis and adding the hashtags for posts on social media.

Then I spent last Saturday evening creating this tool with OpenAI πŸ€– quite basic now, but I am planning to have small increments as we go.

It's been a fun couple of hours doing research, coding, and testing, but it's here!  This AI tool can increase efficiency and optimize the content creation. πŸ’ͺ    

This paragraph was generated with the tool

If you are curious about the code and you want to run locally, this is the repo:

https://github.com/rafaelaazevedo/rediskets

You will need to create a .env file and add your OpenAI API Key, which is generated on their website after you create your account there (It is FREE).

If you just want to try it out, open the link and add the text explaining what your content should be about, maybe even add some personality like (friendly, assertive, etc) to help AI to find out what is more close to what you want. It will generate a post with emojis, hashtags and a picture related to what you wrote. The picture is definitely not the brightest feature as you saw above, but maybe you will have some fun like me and generate a picture of dogs without faces πŸ˜‚

PS: you might get some 502 errors (they are random and unfortunately is because I am using a free trial and OpenAI api is returning the query with some timeouts) πŸ˜”

https://rediskets.netlify.app/

This really represents me after I deployed my code !