Mejora de rendimiento
A Good Way To Automatically Test Our Apps
By Luciano Graziani, SSR Developer at Flowics
๐
What am I going to speak about today?
- What is Cypress?
- In which state is Flowics without Cypress?
- What can we do right now with Cypress?
- What are the immediate benefits?
๐
What is Cypress?
- Is an end-to-end testing framework focused on having a solid collection of tests.
ย - Easy & simple to use API (Abstract Public Interface) to dictate each action the automation bot needs to do.
ย - Easy & simple to use API to validate each action and its result.
๐
What is Cypress?
๐
What is Cypress?
describe('graphics spec', () => {
it('graphics can do initial publish', () => {
const vizId = '5f9ad217583c1fb5ab0eb00f';
cy.visit(`/visualizations/${expId}/${vizId}/edit`);
cy.get('[data-cy=publishBtn]').click();
cy.get('[data-cy=firstChangesToPublishModal]').should('exist');
cy.get('[data-cy=confirmPublishBtn]').click();
cy.get('[data-cy=noChangesModal]').should('exist');
});
it('graphics can re-publish', () => {
const vizId = '5f9ad16a427139c9235104c0';
cy.visit(`/visualizations/${expId}/${vizId}/edit`);
cy.get('[data-cy=publishBtn]').click();
cy.get('[data-cy=newChangesToPublishModal]').should('exist');
cy.get('[data-cy=confirmRePublishBtn]').click();
cy.get('[data-cy=noChangesModal]').should('exist');
});
});
๐
In which state is Flowics without Cypress?
- We are pushing code into production without any throughout validation.
ย - For the complex solutions, we do manual testing and also we tend to ask for help for that.
ย - In the last two months, we had like 4 ~6 bad situations that could have been prevented if we used an automation tool like Cypress.
ย - Refactoring is hard because we don't know if the new code works or not.
๐
What can we do right now with Cypress?
- We can use it locally (dev's computer) to make sure that our changes doesn't break the happy paths.
- We can add more tests around those happy paths, to make our changes are more stable.
- And for every new thing we add, we can write a test for it, so it's already test-oriented.
๐
What are the immediate benefits?
- The most important benefit of all is that we can be sure that if those tests passes, we know that at least the user's happy path is safe.
ย - We can avoid a lot of manual and repetitive testing hence reducing the time spent on ensuring that our changes are safe.
ย - We can introduce teammates to new parts of ours services without a lot of friction, knowing they have a safe net.
๐
Thank you for listening!
Copy of Cypress: a good way to automatically test our apps
By Luciano Graziani
Copy of Cypress: a good way to automatically test our apps
Flowics ๐ Cypress, and so we want to show you how we use it to validate our changes, document our main user actions and solidify our CI processes.
- 53