This first one, part of testing a program feature is running the program
in a way that exercises that feature, that was the last quiz.
Yes, that is part of testing.
We have to exercise the feature and then compare the observed output
to what we expected.
And if they're different, that indicates a bug.
Testing can give us absolute certainty. No.
Testing can give us confidence that our JavaScript interpreter is correct.
Because our JavaScript interpreter could potentially accept an infinite number of inputs--
there are an infinite number of possible JavaScript programs out there--
we don't have time to test them all.
We can't be absolutely certain based on testing,
but it can give us confidence.
Finally, one test input is just as good as another. No.
This was the previous quiz.
We need a test input that exercises the feature.
And if we have a bunch of features in our program, we would want a suite of test inputs
that cover all those features.
“プログラムの機能のテストでは
その機能を実行させ出力を検証する”
これは前の小テストでやりました
正しいです それがテストです
機能を実行させた結果と
期待する結果を比較します
異なればバグがあるということです
“テストでJavaScriptインタプリタが正しいという
絶対的な確証を得られる”
いいえ 得られるのは自信です
JavaScriptインタプリタは
無限の入力を受け取る可能性があります
無数にあるJavaScriptプログラムの
すべてをテストすることはできません
テストでは完璧にバグがないと確信はできませんが
自信をつけることはできます
“テストの入力つまりテストケースは
他の入力との優劣はない”
違います これも前の小テストでやりました
それぞれの機能を試すテストケースが必要です
プログラムに多くの機能があるとしたら
一連の機能をテストするケースが必要でしょう
A primeira: Parte do teste de uma característica consiste em executar o programa
de modo que exercite essa característica -- isso foi o que vimos no último teste.
Sim, isso é parte do teste.
Temos que exercitar a característica e então comparar a saída observada
como o que esperamos.
E, se elas são diferentes, isso indica um erro.
Testar pode nos dar absoluta certeza. Não.
Testes apenas aumentam nossa confiança de que nosso interpretador JavaScript esteja correto.
Como nosso interpretador JavaScript pode, potencialemnte, aceitar um número infinito de entradas --
existe um número infinito de possíveis programas JavaScript --
não temos tempo para testar todos eles.
Não podemos ter absoluta certeza, com base em testes,
mas podemos ganhar mais confiança.
Finalmente: Uma entrada de teste é tão boa quanto outra. Não.
Vimos isso no áutimo teste:
precisamos de uma entrada de teste que exercitasse uma característica.
E se temos uma porção de caracterísiticas em nosso programa, vamos querer um conjunto de entradas de teste
que cubra todas elas.