Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Testando Models
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Diogo Beato
June 16, 2016
Programming
38
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
110
Logging proativo com ELKW
diogobeato
0
260
Isomorphic Javascript
diogobeato
0
170
Fundamentos da JVM
diogobeato
0
340
MinMax
diogobeato
0
100
TDC - Breaking Build
diogobeato
0
87
Breaking Build
diogobeato
0
260
Boas Práticas em APIs REST
diogobeato
2
760
Design para Programadores - Layout
diogobeato
1
65
Other Decks in Programming
See All in Programming
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
360
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
290
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
400
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
130
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.5k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
290
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
140
dRuby over BLE
makicamel
2
390
A2UI という光を覗いてみる
satohjohn
1
150
AI 輔助遺留系統現代化的經驗分享
jame2408
1
950
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
380
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.5k
Ruling the World: When Life Gets Gamed
codingconduct
0
260
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
610
Scaling GitHub
holman
464
140k
Code Review Best Practice
trishagee
74
20k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Balancing Empowerment & Direction
lara
6
1.2k
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