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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Diogo Beato
June 16, 2016
Programming
38
0
Share
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
100
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
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.4k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
2
310
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
400
関係性から理解する"同一性"の型用語たち
pvcresin
2
630
New "Type" system on PicoRuby
pocke
1
430
inferと仲良くなる10分間
ryokatsuse
1
340
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
600
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
17
5.3k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.5k
さぁV100、メモリをお食べ・・・
nilpe
0
120
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
11k
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
420
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.3k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Documentation Writing (for coders)
carmenintech
77
5.4k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
Git: the NoSQL Database
bkeepers
PRO
432
67k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Context Engineering - Making Every Token Count
addyosmani
9
930
How to train your dragon (web standard)
notwaldorf
97
6.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
840
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
180
Navigating Weather and Climate Data
rabernat
0
210
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