{"id":94,"date":"2026-10-20T18:42:40","date_gmt":"2026-10-20T21:42:40","guid":{"rendered":"https:\/\/gumpti.com\/blog\/curso-ctfl\/teste-de-tabela-de-decisao\/"},"modified":"2026-10-20T18:42:40","modified_gmt":"2026-10-20T21:42:40","slug":"teste-de-tabela-de-decisao","status":"publish","type":"page","link":"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/","title":{"rendered":"Teste de tabela de decis\u00e3o"},"content":{"rendered":"<p>Imagine a regra de desconto de uma loja: o cliente \u00e9 VIP ou n\u00e3o, a compra passa de R$ 200 ou n\u00e3o. S\u00e3o quatro combina\u00e7\u00f5es, e cada uma d\u00e1 um desconto diferente.<\/p>\n<p>Esquecer uma combina\u00e7\u00e3o \u00e9 esquecer um tipo de cliente.<\/p>\n<p>A tabela de decis\u00e3o \u00e9 indicada para requisitos em que <strong>combina\u00e7\u00f5es de condi\u00e7\u00f5es<\/strong> geram resultados diferentes, como regras de neg\u00f3cio.<\/p>\n<figure class=\"cenas\" role=\"group\" aria-label=\"Da pergunta ao resultado: as condi\u00e7\u00f5es, as regras (uma coluna por combina\u00e7\u00e3o) e as a\u00e7\u00f5es\"><div class=\"cena\"><svg viewBox=\"0 0 150 110\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"14\" y=\"12\" width=\"122\" height=\"38\" rx=\"8\"\/><rect x=\"14\" y=\"60\" width=\"122\" height=\"38\" rx=\"8\"\/><text x=\"26\" y=\"37\" text-anchor=\"start\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">VIP?<\/text><text x=\"124\" y=\"37\" text-anchor=\"end\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">V \/ F<\/text><text x=\"26\" y=\"85\" text-anchor=\"start\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">\u2265 200?<\/text><text x=\"124\" y=\"85\" text-anchor=\"end\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">V \/ F<\/text><\/svg><span class=\"rotulo\">Condi\u00e7\u00f5es<\/span><p>As <b>perguntas<\/b>, cada uma com resposta verdadeira ou falsa.<\/p><\/div><div class=\"cena\"><svg viewBox=\"0 0 150 110\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"16\" y=\"14\" width=\"118\" height=\"54\" rx=\"4\"\/><path d=\"M16 41h118M45 14v54M75 14v54M104 14v54\" opacity=\".6\"\/><text x=\"30\" y=\"33\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">V<\/text><text x=\"59.5\" y=\"33\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">V<\/text><text x=\"89\" y=\"33\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">F<\/text><text x=\"118.5\" y=\"33\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">F<\/text><text x=\"30\" y=\"60\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">V<\/text><text x=\"59.5\" y=\"60\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">F<\/text><text x=\"89\" y=\"60\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">V<\/text><text x=\"118.5\" y=\"60\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">F<\/text><text x=\"75\" y=\"98\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"15\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">2\u00b2 = 4<\/text><\/svg><span class=\"rotulo\">Regras<\/span><p>Cada coluna \u00e9 uma <b>combina\u00e7\u00e3o<\/b> \u00fanica: 2 condi\u00e7\u00f5es d\u00e3o 2\u00b2 = 4.<\/p><\/div><div class=\"cena\"><svg viewBox=\"0 0 150 110\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"30\" y=\"8\" width=\"90\" height=\"94\" rx=\"6\"\/><path d=\"M30 31h90M30 54h90M30 77h90\" opacity=\".4\"\/><text x=\"75\" y=\"25\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">15%<\/text><text x=\"75\" y=\"48\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">10%<\/text><text x=\"75\" y=\"71\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">5%<\/text><text x=\"75\" y=\"94\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"13\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">0%<\/text><\/svg><span class=\"rotulo\">A\u00e7\u00f5es<\/span><p>O que <b>acontece<\/b> em cada combina\u00e7\u00e3o: aqui, o desconto.<\/p><\/div><\/figure>\n<ul>\n<li><strong>Linhas:<\/strong> condi\u00e7\u00f5es e a\u00e7\u00f5es.<\/li>\n<li><strong>Colunas:<\/strong> regras de decis\u00e3o (uma combina\u00e7\u00e3o \u00fanica de condi\u00e7\u00f5es e a\u00e7\u00f5es).<\/li>\n<li><strong>Entrada limitada:<\/strong> tudo booleano. <strong>Entrada estendida:<\/strong> valores m\u00faltiplos (intervalos, parti\u00e7\u00f5es).<\/li>\n<li><strong>Nota\u00e7\u00e3o das condi\u00e7\u00f5es:<\/strong> <strong>V<\/strong> satisfeita, <strong>F<\/strong> n\u00e3o satisfeita, <strong>\u2013<\/strong> irrelevante para o resultado e <strong>N\/A<\/strong> invi\u00e1vel naquela regra. <strong>A\u00e7\u00f5es:<\/strong> <strong>X<\/strong> quando devem ocorrer; em branco quando n\u00e3o ocorrem.<\/li>\n<\/ul>\n<p>A tabela <strong>completa<\/strong> tem uma coluna por combina\u00e7\u00e3o. Ela pode ser <strong>simplificada<\/strong> (tira as colunas invi\u00e1veis) ou <strong>minimizada<\/strong> (funde as colunas em que uma condi\u00e7\u00e3o n\u00e3o afeta o resultado). O n\u00famero de regras cresce <strong>exponencialmente<\/strong> (2\u207f para n condi\u00e7\u00f5es booleanas), ent\u00e3o use a tabela minimizada ou uma abordagem baseada em risco.<\/p>\n<p><strong>Cobertura = colunas exercitadas \u00f7 total de colunas <u>vi\u00e1veis<\/u> \u00d7 100%<\/strong><\/p>\n<table>\n<tr>\n<th><\/th>\n<th>R1<\/th>\n<th>R2<\/th>\n<th>R3<\/th>\n<th>R4<\/th>\n<\/tr>\n<tr>\n<td>Cliente VIP?<\/td>\n<td>V<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<td>F<\/td>\n<\/tr>\n<tr>\n<td>Compra \u2265 R$ 200?<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<\/tr>\n<tr>\n<td><strong>Desconto<\/strong><\/td>\n<td>15%<\/td>\n<td>10%<\/td>\n<td>5%<\/td>\n<td>0%<\/td>\n<\/tr>\n<\/table>\n<p>Se um caso for invi\u00e1vel, ele sai do total. Uma su\u00edte com R1 e R4 cobre 2 \u00f7 4 = <strong>50%<\/strong>.<\/p>\n<details class=\"pense\"><summary><span class=\"sel\">Pense um instante<\/span><span class=\"q\">Tr\u00eas condi\u00e7\u00f5es booleanas, e duas colunas s\u00e3o imposs\u00edveis. Quantas colunas vi\u00e1veis?<\/span><span class=\"ver\">Ver a resposta<\/span><\/summary><div class=\"resp\"><p>2\u00b3 = 8 colunas no total; 8 \u2212 2 = <strong>6 vi\u00e1veis<\/strong>.<\/p>\n<p><strong>Pegadinha de prova:<\/strong> as colunas imposs\u00edveis saem do total. A cobertura \u00e9 calculada sobre as colunas <strong>vi\u00e1veis<\/strong>, e n\u00e3o sobre as 8.<\/p>\n<\/div><\/details>\n<h2>Receita passo a passo<\/h2>\n<ol>\n<li><strong>Anote<\/strong> as condi\u00e7\u00f5es (as perguntas) e as a\u00e7\u00f5es (o que acontece).<\/li>\n<li><strong>Conte as colunas.<\/strong> Cada condi\u00e7\u00e3o com V ou F multiplica por 2: 2 condi\u00e7\u00f5es = 2\u00b2 = 4 colunas; 3 condi\u00e7\u00f5es = 2\u00b3 = 8. Se uma condi\u00e7\u00e3o tiver 3 valores, ela multiplica por 3 em vez de 2.<\/li>\n<li><strong>Preencha em padr\u00e3o:<\/strong> a 1\u00aa linha com metade V e metade F; a seguinte alterna de 2 em 2; a \u00faltima, de 1 em 1.<\/li>\n<li><strong>Risque<\/strong> as colunas que o texto torna <strong>imposs\u00edveis<\/strong> (elas saem do total).<\/li>\n<li><strong>Conte:<\/strong> o m\u00ednimo de testes \u00e9 o n\u00famero de colunas <strong>vi\u00e1veis<\/strong>. Cobertura = exercitadas \u00f7 vi\u00e1veis.<\/li>\n<\/ol>\n<p><div class=\"exemplo\"><p><strong>Frete gr\u00e1tis:<\/strong> Premium? Compra \u2265 R$ 150? Cupom? (o cupom s\u00f3 vale para Premium). Quantas colunas tem a tabela completa? Quantas s\u00e3o vi\u00e1veis?<\/p>\n<table>\n<tr>\n<th>Condi\u00e7\u00e3o<\/th>\n<th>1<\/th>\n<th>2<\/th>\n<th>3<\/th>\n<th>4<\/th>\n<th>5<\/th>\n<th>6<\/th>\n<th>7<\/th>\n<th>8<\/th>\n<\/tr>\n<tr>\n<td>Premium<\/td>\n<td>V<\/td>\n<td>V<\/td>\n<td>V<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<td>F<\/td>\n<td>F<\/td>\n<td>F<\/td>\n<\/tr>\n<tr>\n<td>Compra \u2265 150<\/td>\n<td>V<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<td>F<\/td>\n<td>V<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<td>F<\/td>\n<\/tr>\n<tr>\n<td>Cupom<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<td>V<\/td>\n<td>F<\/td>\n<\/tr>\n<\/table>\n<p>As colunas 5 e 7 (n\u00e3o Premium com cupom) s\u00e3o <strong>imposs\u00edveis<\/strong>: 8 \u2212 2 = <strong>6 vi\u00e1veis<\/strong>. Uma su\u00edte que exercita 3 delas cobre 3 \u00f7 6 = <strong>50%<\/strong>.<\/p>\n<\/div><br \/>\n<div class=\"exemplo\"><p><strong>Condi\u00e7\u00e3o com 3 valores.<\/strong> Desconto na loja: Cliente (Regular, Prata ou Ouro), Compra \u2265 R$ 100? e Cupom? Colunas: <strong>3 \u00d7 2 \u00d7 2 = 12<\/strong>, e n\u00e3o 8. Se \u201co cupom n\u00e3o vale para Regular\u201d, as duas colunas de Regular com cupom saem: <strong>10 vi\u00e1veis<\/strong>.<\/p>\n<\/div><\/p>\n<p><aside class=\"levar\"><h2>Para levar<\/h2><ul><li>Tabela de decis\u00e3o serve para combina\u00e7\u00f5es de condi\u00e7\u00f5es que geram resultados diferentes: linhas s\u00e3o condi\u00e7\u00f5es e a\u00e7\u00f5es, colunas s\u00e3o regras.<\/li><li>Com n condi\u00e7\u00f5es booleanas, a tabela completa tem 2\u207f colunas. Uma condi\u00e7\u00e3o com 3 valores multiplica por 3.<\/li><li>Cobertura = colunas exercitadas \u00f7 colunas vi\u00e1veis: as imposs\u00edveis saem do total.<\/li><\/ul><\/aside><br \/>\n<p class=\"fecho\">Quer fixar? Responda algumas perguntas deste t\u00f3pico no <a href=\"https:\/\/testaai.gumpti.com\">Testa A\u00ed<\/a>, leve a <a href=\"https:\/\/testaai.gumpti.com\/colinhas\/colinha-capitulo4-ctfl-v4.pdf\">colinha do cap\u00edtulo em PDF<\/a> ou veja a <a href=\"https:\/\/www.youtube.com\/playlist?list=PLDDoW8xBR4V8\">playlist de v\u00eddeos<\/a>.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Como montar e ler uma tabela de decis\u00e3o, contar as colunas (inclusive com condi\u00e7\u00e3o de 3 valores) e calcular a cobertura.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":17,"menu_order":404,"comment_status":"closed","ping_status":"closed","template":"page-guia.php","meta":{"footnotes":""},"class_list":["post-94","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Teste de tabela de decis\u00e3o - Blog GUMP TI<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Teste de tabela de decis\u00e3o - Blog GUMP TI\" \/>\n<meta property=\"og:description\" content=\"Como montar e ler uma tabela de decis\u00e3o, contar as colunas (inclusive com condi\u00e7\u00e3o de 3 valores) e calcular a cobertura.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog GUMP TI\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/teste-de-tabela-de-decisao\\\/\",\"url\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/teste-de-tabela-de-decisao\\\/\",\"name\":\"Teste de tabela de decis\u00e3o - Blog GUMP TI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-20T21:42:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/teste-de-tabela-de-decisao\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/teste-de-tabela-de-decisao\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/teste-de-tabela-de-decisao\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Guia de estudos CTFL 4.0\",\"item\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Teste de tabela de decis\u00e3o\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/\",\"name\":\"Blog GUMP TI\",\"description\":\"Entender primeiro para resolver melhor\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Teste de tabela de decis\u00e3o - Blog GUMP TI","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/","og_locale":"pt_BR","og_type":"article","og_title":"Teste de tabela de decis\u00e3o - Blog GUMP TI","og_description":"Como montar e ler uma tabela de decis\u00e3o, contar as colunas (inclusive com condi\u00e7\u00e3o de 3 valores) e calcular a cobertura.","og_url":"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/","og_site_name":"Blog GUMP TI","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/","url":"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/","name":"Teste de tabela de decis\u00e3o - Blog GUMP TI","isPartOf":{"@id":"https:\/\/gumpti.com\/blog\/#website"},"datePublished":"2026-10-20T21:42:40+00:00","breadcrumb":{"@id":"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gumpti.com\/blog\/guia-ctfl\/teste-de-tabela-de-decisao\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gumpti.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Guia de estudos CTFL 4.0","item":"https:\/\/gumpti.com\/blog\/guia-ctfl\/"},{"@type":"ListItem","position":3,"name":"Teste de tabela de decis\u00e3o"}]},{"@type":"WebSite","@id":"https:\/\/gumpti.com\/blog\/#website","url":"https:\/\/gumpti.com\/blog\/","name":"Blog GUMP TI","description":"Entender primeiro para resolver melhor","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gumpti.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"}]}},"_links":{"self":[{"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/pages\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":0,"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/pages\/94\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/pages\/17"}],"wp:attachment":[{"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}