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
Diogo Beato
June 16, 2016
Programming
0
38
Testando Models
slides para o workshop de teste de models
Diogo Beato
June 16, 2016
Tweet
Share
More Decks by Diogo Beato
See All by Diogo Beato
Cloud Native Banking
diogobeato
1
97
Logging proativo com ELKW
diogobeato
0
250
Isomorphic Javascript
diogobeato
0
160
Fundamentos da JVM
diogobeato
0
340
MinMax
diogobeato
0
100
TDC - Breaking Build
diogobeato
0
84
Breaking Build
diogobeato
0
260
Boas Práticas em APIs REST
diogobeato
2
750
Design para Programadores - Layout
diogobeato
1
63
Other Decks in Programming
See All in Programming
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
CSC307 Lecture 06
javiergs
PRO
0
680
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
Architectural Extensions
denyspoltorak
0
280
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
GraphQLとの向き合い方2022年版
quramy
50
14k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
63
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
300
4 Signs Your Business is Dying
shpigford
187
22k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Being A Developer After 40
akosma
91
590k
Code Reviewing Like a Champion
maltzj
527
40k
Producing Creativity
orderedlist
PRO
348
40k
Test your architecture with Archunit
thirion
1
2.1k
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