T
A
L
K
I
N
G
A
B
O
U
T
T
E
S
T
I
N
G
by Walmyr Filho
WRITING CYPRESS TESTS
WITHOUT CUCUMBER
Talking about testing • Sep. 2, 2021
Talking about testing • Sep. 2, 2021
Talking about testing • Sep. 2, 2021
What we'll see
today
agenda
- Motivation
- Why do we use Cucumber?
- Cypress
- Demo time
- Given/When/Then
- Lists of data
- Tags
- Key take-aways
- Q&A
Talking about testing • Sep. 2, 2021
1 - HOW DO I INTEGRATE CYPRESS WITH THE CUCUMBER PLUGIN?
2 - CAN YOU HELP ME WITH AN ERROR IN THE CUCUMBER INTEGRATION?
3 - HOW DO I ITERATE OVER A LIST IN A CYPRESS TEST IF I'M NOT
USING CUCUMBER?
4 - HOW DO I RUN TESTS BASED ON TAGS WITHOUT CUCUMBER?
people usually ask me
Talking about testing • Sep. 2, 2021
I CAN EASILY DO THAT WITH CUCUMBER
for the last two questions,
they usualy say
Talking about testing • Sep. 2, 2021
IF THEY STILL DON'T KNOW HOW TO CONFIGURE IT (QUESTION 1),
AND HOW TO DEAL WITH ERRORS WHEN THEY HAPPEN(QUESTION 2)?
But what's the point...
Talking about testing • Sep. 2, 2021
DESCRIBING HOW THE APP SHOULD BEHAVE IN A LANGUAGE THAT BOTH
THE BUSINESS AND TECHNICAL TEAMS CAN UNDERSTND.
cucumber helps with ...
Talking about testing • Sep. 2, 2021
But Here's
the thing.
You can have all benefits of Cucumber...
Talking about testing • Sep. 2, 2021
Without using it!
What's Cypress
- A powerful testing automation
framework for anything that runs in
the browser
- An open-source tool with a huge
community around it
- A tool that brings you joy while
using it!
Talking about testing • sep. 2, 2021
demo time
FELL FREE TO FOLLOW ALONG
Just open your terminal and let's code!
Key take-aways
WITHOUT CUCUMBER
- The testing code gets simpler
- We can still have descriptive test cases
(using the key-words Given/When/Then)
- We can talk the same "language" as the
developers (JavaScript)
- By knowing how to use JavaScript, we can
have tests that iterate over lists to save
us lines of code
- By using the cypress-grep plugin, we can
run tests by their tags
Talking about testing • Sep. 2, 2021
Talking about testing • Sep. 2, 2021
Talking about testing • Sep. 2, 2021
Talking about testing • Sep. 2, 2021
Questions?
I'D LOVE TO ANSWER THEM.
Talking
About
Testing
Talking about testing • Sep. 2, 2021
https://walmyr.dev
LET'S KEEP
IN TOUCH

Writing cypress tests without cucumber

  • 1.
    T A L K I N G A B O U T T E S T I N G by Walmyr Filho WRITINGCYPRESS TESTS WITHOUT CUCUMBER Talking about testing • Sep. 2, 2021 Talking about testing • Sep. 2, 2021 Talking about testing • Sep. 2, 2021
  • 2.
    What we'll see today agenda -Motivation - Why do we use Cucumber? - Cypress - Demo time - Given/When/Then - Lists of data - Tags - Key take-aways - Q&A Talking about testing • Sep. 2, 2021
  • 3.
    1 - HOWDO I INTEGRATE CYPRESS WITH THE CUCUMBER PLUGIN? 2 - CAN YOU HELP ME WITH AN ERROR IN THE CUCUMBER INTEGRATION? 3 - HOW DO I ITERATE OVER A LIST IN A CYPRESS TEST IF I'M NOT USING CUCUMBER? 4 - HOW DO I RUN TESTS BASED ON TAGS WITHOUT CUCUMBER? people usually ask me Talking about testing • Sep. 2, 2021
  • 4.
    I CAN EASILYDO THAT WITH CUCUMBER for the last two questions, they usualy say Talking about testing • Sep. 2, 2021
  • 5.
    IF THEY STILLDON'T KNOW HOW TO CONFIGURE IT (QUESTION 1), AND HOW TO DEAL WITH ERRORS WHEN THEY HAPPEN(QUESTION 2)? But what's the point... Talking about testing • Sep. 2, 2021
  • 6.
    DESCRIBING HOW THEAPP SHOULD BEHAVE IN A LANGUAGE THAT BOTH THE BUSINESS AND TECHNICAL TEAMS CAN UNDERSTND. cucumber helps with ... Talking about testing • Sep. 2, 2021
  • 7.
    But Here's the thing. Youcan have all benefits of Cucumber... Talking about testing • Sep. 2, 2021 Without using it!
  • 8.
    What's Cypress - Apowerful testing automation framework for anything that runs in the browser - An open-source tool with a huge community around it - A tool that brings you joy while using it! Talking about testing • sep. 2, 2021
  • 9.
    demo time FELL FREETO FOLLOW ALONG Just open your terminal and let's code!
  • 10.
    Key take-aways WITHOUT CUCUMBER -The testing code gets simpler - We can still have descriptive test cases (using the key-words Given/When/Then) - We can talk the same "language" as the developers (JavaScript) - By knowing how to use JavaScript, we can have tests that iterate over lists to save us lines of code - By using the cypress-grep plugin, we can run tests by their tags Talking about testing • Sep. 2, 2021
  • 11.
    Talking about testing• Sep. 2, 2021 Talking about testing • Sep. 2, 2021 Talking about testing • Sep. 2, 2021 Questions? I'D LOVE TO ANSWER THEM. Talking About Testing
  • 12.
    Talking about testing• Sep. 2, 2021 https://walmyr.dev LET'S KEEP IN TOUCH