ITB 2023 Build Vue Apps Using tdd (Test-Driven Development).pptx

ortussolutions 16 views 21 slides Sep 04, 2024
Slide 1
Slide 1 of 21
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21

About This Presentation

Learn alongside how to use Test Driven Development (TDD) and Vue.js to avoid production issues. Integrate Vue 3, Pinia Store, composition API and TDD in order to tackle the most common bugs and create solid vue components. This presentation is for the beginner or intermediate user.


Slide Content

Session LED BY Jaime Ramirez and Alejandro Herrera Build Vue apps using Test - Driven Development

Jaime Ramirez SPEAKER AT ITB2023 System Engineer Born in El Salvador ColdFusion and JavaScript Developer Currently working for Ortus Solutions since 2019

Alejandro Herrera SPEAKER AT ITB2023 Born in El Salvador ColdFusion and JavaScript Developer Currently working for Ortus Solutions since 20 22

Content Build Vue app using TDD 1 Introduction to TDD Benefits and importance of TDD 2 TDD Scenarios and Environment 3 TDD Basic Structure 4 Expectation and Assertions 5 Example 6

Test Driven Development Build Vue app using TDD How Test-Driven Development (TDD) can help you create better Vue apps B enefits of using TDD B asics of TDD and how it applies to Vue Best practices for implementing TDD in your workflow Welcome! In this presentation, we will explore:

WHAT IS TDD? Thanks to our sponsors

What is TDD? Build Vue app using TDD Write code that is more: Robust Efficient Easier to maintain Have better software products Also known as Red-Green-Refactor , is a software development approach that emphasizes writing automated tests for software before writing the code itself. This approach helps developers ensure that their code has the requirements and behaves as expected. By adopting TDD, developers can:

Benefits and Importance Build Vue app using TDD Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Ipsum dolor sit amet elit, sed do eiusmod tempor. Faster development time Provides an excellent description of the en goal. Automatic, up-to-date documentation Provides information in form of tests, keeping functionalities Up-to-date and accurate. More maintainable code Helps to pay attention to the structure of the code, resulting in cleaner, easier-to-maintain and easier-to-read code. Greater confidence in your code Tests help ensure that the code works as intended, providing developers with greater confidence in their code. The tests also make it easier to know whether any changes made to the code broke any existing functionality.

SCENARIOS AND ENVIRONMENT Thanks to our sponsors

Scenarios and Environment Build Vue app using TDD In Vue, TDD can be used to test components, directives, and other parts of your application. By testing each part of your app in isolation, you can catch bugs early and ensure that your components are working as expected. WORKFLOW REFACTOR FOR QUALITY WRITE A FAILING TEST MAKE THE TEST PASS SCENARIOS ENVIRONMENT Pinia Vue Vite Vitest

STRUCTURE Thanks to our sponsors

Test Alias: It test defines a set of related expectations. It receives the test name and a function that holds the expectations to test. Basic Structure Build Vue app using TDD Describe When you use test in the top level of file are part of the implicit suite. Using describe you can define a new related suite with nested tests and benchmarks.

Basic Structure Build Vue app using TDD

EXPECTATIONS Thanks to our sponsors

Expectations Build Vue app using TDD expect() Is used for writing tests. The expect function takes a value as an argument and returns an object that can be used to make sure if the behaviors of the component is working as we spect.

ASSERTIONS Thanks to our sponsors

Assertions Build Vue app using TDD Assertions are used to make specific comparisons and tests in a more readable and intuitive way: Assertions are used to test if a particular value or function behaves as expected.

Expectations and Assertions Build Vue app using TDD

CASE STUDY Thanks to our sponsors

Create test Set Up Project Case Study Build Vue app using TDD Build

THANK YOU Thanks to our sponsors