Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Testando Models
Search
Diogo Beato
June 16, 2016
Programming
44
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Testando Models
slides para o workshop de teste de models
Diogo Beato
June 16, 2016
More Decks by Diogo Beato
See All by Diogo Beato
Cloud Native Banking
diogobeato
1
120
Logging proativo com ELKW
diogobeato
0
270
Isomorphic Javascript
diogobeato
0
180
Fundamentos da JVM
diogobeato
0
350
MinMax
diogobeato
0
110
TDC - Breaking Build
diogobeato
0
90
Breaking Build
diogobeato
0
270
Boas Práticas em APIs REST
diogobeato
2
770
Design para Programadores - Layout
diogobeato
1
67
Other Decks in Programming
See All in Programming
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
R8 の設定見直しでアプリサイズ削減
andpad
0
220
sbt 2.0: takeoff
eed3si9n
0
160
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
カツオ、ご期待ください
suneo3476
0
190
AmebaブログはKMPから卒業します
kmars0605
0
190
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
phperだってパンチカードでコーディングしたい
o0h
PRO
0
330
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Raft: Consensus for Rubyists
vanstee
142
7.8k
Facilitating Awesome Meetings
lara
57
7.2k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
570
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
How to build a perfect <img>
jonoalderson
1
6.1k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Transcript
TESTANDO MODELS
O Bug do model de ocorrencia_agendamento O PROBLEMA
ENTIDADE OCORRÊNCIA AGENDAMENTO
TABELA DE OCORRENCIA_AGENDAMENTO
ENTIDADE OCORRÊNCIA AGENDAMENTO
COMO FAZER UM TESTE PARA PREVINIR ESSES BUGS?
BOAS PRÁTICAS NOS MAPEAMENTOS
BEAN VALIDATION • @NotNull • @Size • @Min • etc…
• Grouping Constraints ->
BOAS PRÁTICAS DE INTEGRIDADE
PORQUÊ TESTAR MODELS? • Teste de regressão • Base de
toda aplicação MVC • Garantir integridade dos dados • Encontrar Smells no seu modelo
DIFICULDADE EM TESTAR MODELS • setup de ambiente de teste
de integração • criar o banco • popular os dados para o teste • voltar o banco ao estado inicial.
DIFICULDADE EM TESTAR MODELS • setup de ambiente de teste
de integração • criar o banco (DOCKER) • popular os dados para o teste (FIXTURE FACTORY???) • voltar o banco ao estado inicial (DOCKER)
PROBLEMAS COM FIXTURE FACTORY • Template engessado. • Problema com
referencia cíclica. • Fixtures geradas com Regex.
HTTPS://GITHUB.COM/DVBEATO/ROOKIE SOLUÇÃO ALTERNATIVA • Templates flexíveis • Facilidade na geração
de dados em grande volume. • Facilidade na geração de dados com relacionamento.
\,,/ DEMO ^ ^ V
PRÓXIMOS PASSOS • aplicar as técnicas no erp-models. • fazer
ele compilar independente (como o erp-commons): • adicionar um sonar pra ele no pull-request e quebrar o build quando baixar as métricas.
None