{"id":15322,"date":"2025-10-13T17:02:42","date_gmt":"2025-10-13T15:02:42","guid":{"rendered":"https:\/\/www.palentino.es\/blog\/?p=15322"},"modified":"2025-10-13T17:09:35","modified_gmt":"2025-10-13T15:09:35","slug":"%f0%9f%a7%a0-tipos-de-pruebas-de-software-y-el-arte-de-programar-a-la-defensiva","status":"publish","type":"post","link":"https:\/\/www.palentino.es\/blog\/%f0%9f%a7%a0-tipos-de-pruebas-de-software-y-el-arte-de-programar-a-la-defensiva\/","title":{"rendered":"&#x1f9e0; Tipos de pruebas de software y el arte de programar a la defensiva"},"content":{"rendered":"<p data-start=\"266\" data-end=\"447\">Probar software es m\u00e1s que buscar errores: es ense\u00f1ar a tu c\u00f3digo a sobrevivir al caos. Un programa sin pruebas es como un coche sin frenos: puede arrancar, pero no llegar\u00e1 lejos.<\/p>\n<p data-start=\"266\" data-end=\"447\"><a href=\"https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/10\/tipos-pruebas-palentino.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15323\" src=\"https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/10\/tipos-pruebas-palentino.gif\" alt=\"\" width=\"1274\" height=\"858\" \/><\/a><\/p>\n<p data-start=\"266\" data-end=\"447\"><!--more--><\/p>\n<h4 data-start=\"449\" data-end=\"476\">&#x1f9e9; Pruebas unitarias<\/h4>\n<p data-start=\"477\" data-end=\"772\">Eval\u00faan funciones o m\u00e9todos individuales.<br data-start=\"518\" data-end=\"521\" \/><em data-start=\"521\" data-end=\"531\">Ejemplo:<\/em> comprobar que CalcularIVA(100) devuelva 121, y que si entra un valor negativo, no se bloquee sino que lo maneje correctamente.<br data-start=\"662\" data-end=\"665\" \/>&#x1f449; Aqu\u00ed brilla la <strong data-start=\"683\" data-end=\"709\">programaci\u00f3n defensiva<\/strong>: validar entradas, capturar excepciones y prever lo imposible.<\/p>\n<h4 data-start=\"774\" data-end=\"806\">&#x1f517; Pruebas de integraci\u00f3n<\/h4>\n<p data-start=\"807\" data-end=\"1002\">Verifican que los m\u00f3dulos colaboren correctamente.<br data-start=\"857\" data-end=\"860\" \/><em data-start=\"860\" data-end=\"870\">Ejemplo:<\/em> cuando un usuario se registra, se crea su perfil y se env\u00eda un correo. Si algo falla, el sistema debe recuperarse sin perder datos.<\/p>\n<h4 data-start=\"1004\" data-end=\"1033\">&#x1f9ed; Pruebas funcionales<\/h4>\n<p data-start=\"1034\" data-end=\"1191\">Confirman que el software cumple los requisitos.<br data-start=\"1082\" data-end=\"1085\" \/><em data-start=\"1085\" data-end=\"1095\">Ejemplo:<\/em> el bot\u00f3n \u201cGuardar\u201d debe realmente guardar, no solo mostrar \u201cOperaci\u00f3n completada\u201d por cortes\u00eda.<\/p>\n<h4 data-start=\"1193\" data-end=\"1225\">&#x2699;&#xfe0f; Pruebas de rendimiento<\/h4>\n<p data-start=\"1226\" data-end=\"1342\">Miden velocidad, estabilidad y consumo.<br data-start=\"1265\" data-end=\"1268\" \/><em data-start=\"1268\" data-end=\"1278\">Ejemplo:<\/em> simular 1000 usuarios a la vez para ver si la web sigue viva.<\/p>\n<h4 data-start=\"1344\" data-end=\"1374\">&#x1f512; Pruebas de seguridad<\/h4>\n<p data-start=\"1375\" data-end=\"1490\">Detectan vulnerabilidades.<br data-start=\"1401\" data-end=\"1404\" \/><em data-start=\"1404\" data-end=\"1414\">Ejemplo:<\/em> probar si una inyecci\u00f3n SQL (&#8216; OR &#8216;1&#8217;=&#8217;1) puede acceder sin contrase\u00f1a.<\/p>\n<h4 data-start=\"1492\" data-end=\"1523\">&#x1f440; Pruebas de usabilidad<\/h4>\n<p data-start=\"1524\" data-end=\"1653\">Eval\u00faan la experiencia del usuario.<br data-start=\"1559\" data-end=\"1562\" \/><em data-start=\"1562\" data-end=\"1572\">Ejemplo:<\/em> si alguien tarda m\u00e1s de un minuto en encontrar \u201cCerrar sesi\u00f3n\u201d, algo anda mal.<\/p>\n<hr data-start=\"1655\" data-end=\"1658\" \/>\n<h3 data-start=\"1660\" data-end=\"1703\">&#x1f9f0; <strong data-start=\"1667\" data-end=\"1703\">Anexo: Herramientas recomendadas<\/strong><\/h3>\n<div class=\"_tableContainer_1rjym_1\">\n<div class=\"group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse\" tabindex=\"-1\">\n<table class=\"w-fit min-w-(--thread-content-width)\" data-start=\"1705\" data-end=\"2263\">\n<thead data-start=\"1705\" data-end=\"1749\">\n<tr data-start=\"1705\" data-end=\"1749\">\n<th data-start=\"1705\" data-end=\"1722\" data-col-size=\"sm\">Tipo de prueba<\/th>\n<th data-start=\"1722\" data-end=\"1749\" data-col-size=\"md\">Herramientas destacadas<\/th>\n<\/tr>\n<\/thead>\n<tbody data-start=\"1796\" data-end=\"2263\">\n<tr data-start=\"1796\" data-end=\"1890\">\n<td data-start=\"1796\" data-end=\"1808\" data-col-size=\"sm\">Unitarias<\/td>\n<td data-start=\"1808\" data-end=\"1890\" data-col-size=\"md\"><strong data-start=\"1810\" data-end=\"1819\">JUnit<\/strong> (Java), <strong data-start=\"1828\" data-end=\"1837\">NUnit<\/strong> (.NET), <strong data-start=\"1846\" data-end=\"1856\">PyTest<\/strong> (Python), <strong data-start=\"1867\" data-end=\"1876\">xUnit<\/strong>, <strong data-start=\"1878\" data-end=\"1888\">MSTest<\/strong><\/td>\n<\/tr>\n<tr data-start=\"1891\" data-end=\"1964\">\n<td data-start=\"1891\" data-end=\"1905\" data-col-size=\"sm\">Integraci\u00f3n<\/td>\n<td data-start=\"1905\" data-end=\"1964\" data-col-size=\"md\"><strong data-start=\"1907\" data-end=\"1918\">Postman<\/strong>, <strong data-start=\"1920\" data-end=\"1930\">SoapUI<\/strong>, <strong data-start=\"1932\" data-end=\"1943\">Cypress<\/strong>, <strong data-start=\"1945\" data-end=\"1962\">Selenium Grid<\/strong><\/td>\n<\/tr>\n<tr data-start=\"1965\" data-end=\"2054\">\n<td data-start=\"1965\" data-end=\"1979\" data-col-size=\"sm\">Funcionales<\/td>\n<td data-start=\"1979\" data-end=\"2054\" data-col-size=\"md\"><strong data-start=\"1981\" data-end=\"1993\">Selenium<\/strong>, <strong data-start=\"1995\" data-end=\"2011\">TestComplete<\/strong>, <strong data-start=\"2013\" data-end=\"2031\">Katalon Studio<\/strong>, <strong data-start=\"2033\" data-end=\"2052\">Robot Framework<\/strong><\/td>\n<\/tr>\n<tr data-start=\"2055\" data-end=\"2119\">\n<td data-start=\"2055\" data-end=\"2069\" data-col-size=\"sm\">Rendimiento<\/td>\n<td data-start=\"2069\" data-end=\"2119\" data-col-size=\"md\"><strong data-start=\"2071\" data-end=\"2081\">JMeter<\/strong>, <strong data-start=\"2083\" data-end=\"2093\">Locust<\/strong>, <strong data-start=\"2095\" data-end=\"2109\">LoadRunner<\/strong>, <strong data-start=\"2111\" data-end=\"2117\">k6<\/strong><\/td>\n<\/tr>\n<tr data-start=\"2120\" data-end=\"2193\">\n<td data-start=\"2120\" data-end=\"2132\" data-col-size=\"sm\">Seguridad<\/td>\n<td data-start=\"2132\" data-end=\"2193\" data-col-size=\"md\"><strong data-start=\"2134\" data-end=\"2147\">OWASP ZAP<\/strong>, <strong data-start=\"2149\" data-end=\"2163\">Burp Suite<\/strong>, <strong data-start=\"2165\" data-end=\"2175\">Nessus<\/strong>, <strong data-start=\"2177\" data-end=\"2191\">Metasploit<\/strong><\/td>\n<\/tr>\n<tr data-start=\"2194\" data-end=\"2263\">\n<td data-start=\"2194\" data-end=\"2207\" data-col-size=\"sm\">Usabilidad<\/td>\n<td data-start=\"2207\" data-end=\"2263\" data-col-size=\"md\"><strong data-start=\"2209\" data-end=\"2219\">Hotjar<\/strong>, <strong data-start=\"2221\" data-end=\"2234\">Crazy Egg<\/strong>, <strong data-start=\"2236\" data-end=\"2244\">Maze<\/strong>, <strong data-start=\"2246\" data-end=\"2261\">UserTesting<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<hr data-start=\"2265\" data-end=\"2268\" \/>\n<p data-start=\"2270\" data-end=\"2441\">&#x1f4a1; <strong data-start=\"2273\" data-end=\"2291\">Consejo final:<\/strong> combina pruebas autom\u00e1ticas con programaci\u00f3n defensiva. Un c\u00f3digo bien probado es estable, pero un c\u00f3digo que se defiende a s\u00ed mismo es <em data-start=\"2428\" data-end=\"2435\">sabio<\/em>. &#x1f604;<\/p>\n<p data-start=\"2270\" data-end=\"2441\"><a href=\"https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/05\/Contacto-oscar.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14716\" src=\"https:\/\/www.palentino.es\/blog\/wp-content\/uploads\/2025\/05\/Contacto-oscar.gif\" alt=\"\" width=\"556\" height=\"160\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Probar software es m\u00e1s que buscar errores: es ense\u00f1ar a tu c\u00f3digo a sobrevivir al caos. Un programa sin pruebas es como un coche sin frenos: puede arrancar, pero no llegar\u00e1 lejos.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1415],"tags":[],"class_list":["post-15322","post","type-post","status-publish","format-standard","hentry","category-sin-categoria-es"],"_links":{"self":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/15322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/comments?post=15322"}],"version-history":[{"count":4,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/15322\/revisions"}],"predecessor-version":[{"id":15327,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/15322\/revisions\/15327"}],"wp:attachment":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/media?parent=15322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/categories?post=15322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/tags?post=15322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}