{"id":93,"date":"2026-10-20T18:42:38","date_gmt":"2026-10-20T21:42:38","guid":{"rendered":"https:\/\/gumpti.com\/blog\/curso-ctfl\/analise-de-valor-limite\/"},"modified":"2026-10-20T18:42:38","modified_gmt":"2026-10-20T21:42:38","slug":"analise-de-valor-limite","status":"publish","type":"page","link":"https:\/\/gumpti.com\/blog\/guia-ctfl\/analise-de-valor-limite\/","title":{"rendered":"An\u00e1lise de valor limite (BVA): 2 e 3 valores"},"content":{"rendered":"<p>Imagine uma catraca que libera a entrada com 18 anos. O defeito mais comum \u00e9 o programador escrever <code>&gt; 18<\/code> onde era <code>&gt;= 18<\/code>.<\/p>\n<p>Quem testa 30 nunca v\u00ea isso. Quem testa 17 e 18 v\u00ea na hora.<\/p>\n<p>A an\u00e1lise de valor limite (BVA, de <em>Boundary Value Analysis<\/em>) testa os <strong>limites das parti\u00e7\u00f5es<\/strong>, onde os desenvolvedores mais erram: um limite deslocado para cima ou para baixo, ou omitido. <strong>S\u00f3 serve para parti\u00e7\u00f5es ordenadas<\/strong>, e o m\u00ednimo e o m\u00e1ximo de cada parti\u00e7\u00e3o s\u00e3o os seus limites.<\/p>\n<figure class=\"cenas c2 sem-seta\" role=\"group\" aria-label=\"BVA de 2 valores testa o limite e um vizinho; BVA de 3 valores testa o limite e os dois vizinhos\"><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\"><path d=\"M6 46h138\" opacity=\".4\"\/><path d=\"M36 28v36\" stroke=\"#00A651\" stroke-width=\"3\"\/><path d=\"M114 28v36\" stroke=\"#00A651\" stroke-width=\"3\"\/><circle cx=\"22\" cy=\"46\" r=\"6\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"50\" cy=\"46\" r=\"6\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"100\" cy=\"46\" r=\"6\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"128\" cy=\"46\" r=\"6\" fill=\"currentColor\" stroke=\"none\"\/><text x=\"22\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"15\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">17<\/text><text x=\"50\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"15\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">18<\/text><text x=\"100\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"15\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">60<\/text><text x=\"128\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"15\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">61<\/text><\/svg><span class=\"rotulo\">BVA de 2 valores<\/span><p>O limite e o <b>vizinho<\/b> da parti\u00e7\u00e3o ao lado: 17 e 18, 60 e 61.<\/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\"><path d=\"M6 46h138\" opacity=\".4\"\/><path d=\"M35.5 28v36\" stroke=\"#00A651\" stroke-width=\"3\"\/><path d=\"M111.5 28v36\" stroke=\"#00A651\" stroke-width=\"3\"\/><circle cx=\"10\" cy=\"46\" r=\"4.5\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"27\" cy=\"46\" r=\"4.5\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"44\" cy=\"46\" r=\"4.5\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"61\" cy=\"46\" r=\"4.5\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"86\" cy=\"46\" r=\"4.5\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"103\" cy=\"46\" r=\"4.5\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"120\" cy=\"46\" r=\"4.5\" fill=\"currentColor\" stroke=\"none\"\/><circle cx=\"137\" cy=\"46\" r=\"4.5\" fill=\"currentColor\" stroke=\"none\"\/><text x=\"10\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"11\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">16<\/text><text x=\"27\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"11\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">17<\/text><text x=\"44\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"11\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">18<\/text><text x=\"61\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"11\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">19<\/text><text x=\"86\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"11\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">59<\/text><text x=\"103\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"11\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">60<\/text><text x=\"120\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"11\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">61<\/text><text x=\"137\" y=\"88\" text-anchor=\"middle\" font-family=\"Montserrat,Arial,sans-serif\" font-size=\"11\" font-weight=\"800\" fill=\"currentColor\" stroke=\"none\">62<\/text><\/svg><span class=\"rotulo\">BVA de 3 valores<\/span><p>O limite e os <b>dois vizinhos<\/b>: 16 a 19, 59 a 62. Mais rigoroso.<\/p><\/div><\/figure>\n<ul>\n<li><strong>2 valores:<\/strong> o limite e o <strong>vizinho mais pr\u00f3ximo da parti\u00e7\u00e3o adjacente<\/strong> (2 itens por limite).<\/li>\n<li><strong>3 valores:<\/strong> o limite e <strong>os dois vizinhos<\/strong> (3 itens por limite). Os <strong>limites<\/strong> s\u00e3o o m\u00ednimo e o m\u00e1ximo de <strong>cada<\/strong> parti\u00e7\u00e3o ordenada, <strong>v\u00e1lida ou inv\u00e1lida<\/strong>.<\/li>\n<\/ul>\n<p>O BVA de 3 valores \u00e9 <strong>mais rigoroso<\/strong>. Se \u201cx \u2264 10\u201d foi codificado como \u201cx = 10\u201d, os valores 10 e 11 do BVA de 2 valores n\u00e3o detectam, mas x = 9 (3 valores) provavelmente detecta.<\/p>\n<p><strong>Cobertura de BVA = itens exercitados \u00f7 total de itens identificados \u00d7 100%<\/strong><\/p>\n<p><div class=\"exemplo\"><p>Idade de <strong>18 a 60<\/strong>. <strong>BVA de 2 valores:<\/strong> 17, 18, 60, 61 \u2192 <strong>4 valores<\/strong>. A su\u00edte {17, 18, 60} cobre 3 \u00f7 4 = <strong>75%<\/strong>. <strong>BVA de 3 valores:<\/strong> 16, 17, 18, 19, 59, 60, 61, 62 \u2192 <strong>8 valores<\/strong>.<\/p>\n<\/div><br \/>\n<div class=\"callout\"><p>Escolha a faixa (parti\u00e7\u00e3o) e teste os extremos (limite). Com 2 valores: o limite mais <strong>1 vizinho<\/strong>. Com 3 valores: o limite mais os <strong>2 vizinhos<\/strong> (dentro e fora).<\/p>\n<\/div><\/p>\n<details class=\"pense\"><summary><span class=\"sel\">Pense um instante<\/span><span class=\"q\">Idade de 18 a 60: quantos valores o BVA de 3 valores pede?<\/span><span class=\"ver\">Ver a resposta<\/span><\/summary><div class=\"resp\"><p><strong>8 valores:<\/strong> 16, 17, 18, 19, 59, 60, 61 e 62.<\/p>\n<p><strong>Pegadinha de prova:<\/strong> alguns materiais contam s\u00f3 os limites da parti\u00e7\u00e3o v\u00e1lida e chegam a 6. Pelo Syllabus, valem os limites de <strong>cada<\/strong> parti\u00e7\u00e3o ordenada. Confirme sempre se a quest\u00e3o pede 2 ou 3 valores.<\/p>\n<\/div><\/details>\n<h2>Receita passo a passo<\/h2>\n<ol>\n<li><strong>Desenhe a r\u00e9gua<\/strong> com as parti\u00e7\u00f5es <strong>ordenadas<\/strong> (v\u00e1lidas e inv\u00e1lidas).<\/li>\n<li>Marque cada <strong>fronteira<\/strong> (\u00faltimo de uma parti\u00e7\u00e3o | primeiro da pr\u00f3xima). Se a quest\u00e3o disser o menor ou o maior valor poss\u00edvel do campo (por exemplo, \u201ccome\u00e7a em 0\u201d), ele \u00e9 uma <strong>ponta<\/strong>.<\/li>\n<li><strong>2 valores:<\/strong> cada fronteira d\u00e1 <strong>os 2 lados<\/strong> (a, b). Cada ponta d\u00e1 o pr\u00f3prio valor.<\/li>\n<li><strong>3 valores:<\/strong> cada fronteira d\u00e1 <strong>4<\/strong> (a\u22121, a, b, b+1). Cada ponta d\u00e1 o valor e o vizinho de dentro.<\/li>\n<li><strong>Junte tudo e tire os repetidos.<\/strong> Essa \u00e9 a lista de itens de cobertura.<\/li>\n<li><strong>% de cobertura<\/strong> = valores da su\u00edte que est\u00e3o na lista \u00f7 tamanho da lista. <strong>Valores adicionais (2 \u2192 3)<\/strong> = lista de 3 menos a lista de 2.<\/li>\n<\/ol>\n<p><div class=\"exemplo\"><p>Frete: peso inteiro; de 1 a 10 kg paga R$ 15; de 11 a 30 kg paga R$ 30; menos de 1 ou mais de 30 \u00e9 recusado. Fronteiras: 0|1, 10|11 e 30|31.<\/p>\n<table>\n<tr>\n<th>Fronteira<\/th>\n<th>2 valores<\/th>\n<th>3 valores<\/th>\n<\/tr>\n<tr>\n<td>0 | 1<\/td>\n<td>0, 1<\/td>\n<td>\u22121, 0, 1, 2<\/td>\n<\/tr>\n<tr>\n<td>10 | 11<\/td>\n<td>10, 11<\/td>\n<td>9, 10, 11, 12<\/td>\n<\/tr>\n<tr>\n<td>30 | 31<\/td>\n<td>30, 31<\/td>\n<td>29, 30, 31, 32<\/td>\n<\/tr>\n<tr>\n<td><strong>Total<\/strong><\/td>\n<td><strong>6<\/strong><\/td>\n<td><strong>12<\/strong><\/td>\n<\/tr>\n<\/table>\n<p>Su\u00edte {1, 10, 11, 20}: 1, 10 e 11 est\u00e3o na lista de 2 valores (o 20 n\u00e3o) \u2192 3 \u00f7 6 = <strong>50%<\/strong>.<\/p>\n<\/div><br \/>\n<div class=\"exemplo\"><p><strong>Com ponta.<\/strong> Senha de 6 a 12 caracteres; o campo come\u00e7a em 0. Fronteiras 5|6 e 12|13, e ponta 0. <strong>2 valores:<\/strong> {0, 5, 6, 12, 13}. <strong>3 valores:<\/strong> {0, 1, 4, 5, 6, 7, 11, 12, 13, 14}. Valores adicionais (2 \u2192 3): <strong>1, 4, 7, 11, 14<\/strong>.<\/p>\n<\/div><\/p>\n<p><aside class=\"levar\"><h2>Para levar<\/h2><ul><li>BVA testa os limites das parti\u00e7\u00f5es, onde os desenvolvedores mais erram, e s\u00f3 serve para parti\u00e7\u00f5es ordenadas.<\/li><li>2 valores: o limite e um vizinho. 3 valores: o limite e os dois vizinhos, mais rigoroso.<\/li><li>Os limites s\u00e3o os de cada parti\u00e7\u00e3o ordenada, v\u00e1lida ou inv\u00e1lida: para 18 a 60, s\u00e3o 4 valores com 2 e 8 valores com 3.<\/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 testar as bordas das parti\u00e7\u00f5es, a diferen\u00e7a entre o BVA de 2 e o de 3 valores e uma receita passo a passo com exemplos.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":17,"menu_order":403,"comment_status":"closed","ping_status":"closed","template":"page-guia.php","meta":{"footnotes":""},"class_list":["post-93","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>An\u00e1lise de valor limite (BVA): 2 e 3 valores - 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\/analise-de-valor-limite\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An\u00e1lise de valor limite (BVA): 2 e 3 valores - Blog GUMP TI\" \/>\n<meta property=\"og:description\" content=\"Como testar as bordas das parti\u00e7\u00f5es, a diferen\u00e7a entre o BVA de 2 e o de 3 valores e uma receita passo a passo com exemplos.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gumpti.com\/blog\/guia-ctfl\/analise-de-valor-limite\/\" \/>\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\\\/analise-de-valor-limite\\\/\",\"url\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/analise-de-valor-limite\\\/\",\"name\":\"An\u00e1lise de valor limite (BVA): 2 e 3 valores - Blog GUMP TI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-20T21:42:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/analise-de-valor-limite\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/analise-de-valor-limite\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gumpti.com\\\/blog\\\/guia-ctfl\\\/analise-de-valor-limite\\\/#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\":\"An\u00e1lise de valor limite (BVA): 2 e 3 valores\"}]},{\"@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":"An\u00e1lise de valor limite (BVA): 2 e 3 valores - 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\/analise-de-valor-limite\/","og_locale":"pt_BR","og_type":"article","og_title":"An\u00e1lise de valor limite (BVA): 2 e 3 valores - Blog GUMP TI","og_description":"Como testar as bordas das parti\u00e7\u00f5es, a diferen\u00e7a entre o BVA de 2 e o de 3 valores e uma receita passo a passo com exemplos.","og_url":"https:\/\/gumpti.com\/blog\/guia-ctfl\/analise-de-valor-limite\/","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\/analise-de-valor-limite\/","url":"https:\/\/gumpti.com\/blog\/guia-ctfl\/analise-de-valor-limite\/","name":"An\u00e1lise de valor limite (BVA): 2 e 3 valores - Blog GUMP TI","isPartOf":{"@id":"https:\/\/gumpti.com\/blog\/#website"},"datePublished":"2026-10-20T21:42:38+00:00","breadcrumb":{"@id":"https:\/\/gumpti.com\/blog\/guia-ctfl\/analise-de-valor-limite\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gumpti.com\/blog\/guia-ctfl\/analise-de-valor-limite\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gumpti.com\/blog\/guia-ctfl\/analise-de-valor-limite\/#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":"An\u00e1lise de valor limite (BVA): 2 e 3 valores"}]},{"@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\/93","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=93"}],"version-history":[{"count":0,"href":"https:\/\/gumpti.com\/blog\/wp-json\/wp\/v2\/pages\/93\/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=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}