Test script: Difference between revisions

Content deleted Content added
No edit summary
 
(92 intermediate revisions by 57 users not shown)
Line 1:
{{Multiple issues|
A '''test script''' is a short program written in a programming language used to test part of the functionality of a software system. A written set of steps that should be performed manually can also be called a test script, however this is more correctly called a '''[[test case]]'''.
{{Original research|date=July 2009}}
{{More citations needed|date=December 2009}}
}}
 
<!-- This article has a lot of weasel words, please amend where you can -->
Any test that is written as a short program is regarded as an automated test. Test scripts written as a short program can either be written using a special automated functional GUI test tool or in a well-known [[programming language]] (such as [[C++]], [[Tcl]], [[Expect]], [[Java programming language|Java]], [[Perl]], [[Python programming language|Python]], or more recently, [[Ruby programming language|Ruby]]). Automated test tools can test many areas of system functionality such as the user interface, performance of the system, the system code and the requirements.
A '''test script''' in [[software testing]] is a set of instructions that will be performed on the [[system under test]] to test that the system functions as expected.
 
== Types of test scripts ==
Automated testing has the advantage over manual testing in that it is easily repeatable, and thus is favoured when doing regression testing. This however is not always the case as automated tests may be poorly written and can break during playback. Since most systems are designed with human interaction in mind, it is good practice that a human tests the system at some point.
There are various means for executing test scripts. These last two types are also done in manual testing.
* [[Manual testing]].<ref>{{cite web|url=https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.rational.test.qm.doc/topics/t_construct_scripts.html&scope=null|title=Help - IBM Rational Software|website=jazz.net|access-date=2018-09-12}}</ref><ref>{{cite web|last=Kaner |first=Cem |url=http://www.testingeducation.org/articles/fundamental_challenges_in_software_testing_presentation.pdf |title=Fundamental Challenges in Software Testing |year=2003 | publisher=Florida Tech |page=35 |access-date=2018-09-12}}</ref> These are more commonly called [[Test case (software)|test case]]s.
* [[Automated testing]].
** Short program written in a programming language used to test part of the functionality of a software system. Test scripts written as a short program can either be written using a special automated functional GUI test tool (such as [[HP QuickTest Professional]], [[SilkTest|Borland SilkTest]], [[IBM TPNS]] and [[Rational Software|Rational Robot]]) or in a well-known [[programming language]] (such as [[C++]], [[C Sharp (programming language)|C#]], [[Tcl]], [[Expect]], [[Java (programming language)|Java]], [[PHP]], [[Perl]], [[Windows Powershell|Powershell]], [[Python (programming language)|Python]], or [[Ruby programming language|Ruby]]). As documented in IEEE, ISO and IEC.<ref>{{cite web|url=http://www.testingstandards.co.uk/bs_7925-1.htm|title=BS 7925-1|website=testingstandards.co.uk|access-date=2018-09-12}}</ref><ref>{{cite web|url=http://www.softwaretestingstandard.org/|title=ISO/IEC/IEEE 29119 Software Testing Standard|website=softwaretestingstandard.org|access-date=2018-09-12}}</ref>
** Extensively parameterized short programs a.k.a. [[Data-driven testing]]
** Reusable steps created in a table a.k.a. [[Keyword-driven testing|keyword-driven]] or [[table-driven testing]].
 
== Usage and functionality ==
For additional information about written test scripts, please see the [[test case]] article.
Automated testing may be executed continuously without the need for human intervention, they are easily repeatable, and often faster. Automated tests are useful in situations where the test is to be executed several times, for example as part of [[regression testing]]. Automated tests can be disadvantageous when poorly written, leading to incorrect testing or broken tests being carried out.<ref>{{Cite book |last1=Dingsøyr |first1=Torgeir |url=https://books.google.com/books?id=JRhGAAAAQBAJ&dq=Test+script+broken+tests&pg=PA194 |title=Agile Software Development: Current Research and Future Directions |last2=Dybå |first2=Tore |last3=Moe |first3=Nils Brede |date=2010-05-26 |publisher=Springer Science & Business Media |isbn=978-3-642-12575-1 |language=en}}</ref>
 
Automated tests can, like any piece of software, be poorly written or simply break during playback.<ref>{{Cite book |last1=Brambilla |first1=Marco |url=https://books.google.com/books?id=J5EtEAAAQBAJ&dq=Test+script+broken+tests&pg=PA385 |title=Web Engineering: 21st International Conference, ICWE 2021, Biarritz, France, May 18–21, 2021, Proceedings |last2=Chbeir |first2=Richard |last3=Frasincar |first3=Flavius |last4=Manolescu |first4=Ioana |date=2021-05-11 |publisher=Springer Nature |isbn=978-3-030-74296-6 |language=en}}</ref> They also can only examine what they have been programmed to examine. Since most systems are designed with human interaction in mind, it is good practice that a human tests the system at some point. A trained manual tester can notice that the system under test is misbehaving without being prompted or directed; automated tests can only examine what they have been programmed to examine. When used in regression testing, manual testers can find new bugs while ensuring that old bugs do not reappear while an automated test can only ensure the latter. Mixed testing, with automated and manual testing, is often used; automating what needs to be tested often and can be easily checked by a machine, and using manual testing to do [[test design]] and [[exploratory testing]].
 
One should consider the [[return on investment]] for automating any given test script, i.e. does the cost to build and maintain that script cost less than it would take to simply execute it manually. Where cost can be measured in terms of time and/or money but also the [[opportunity cost]] of not freeing up people to do other work.{{Citation needed|date=January 2016}}
 
==See also==
Line 12 ⟶ 27:
*[[Test plan]]
*[[Test suite]]
*[[Scenario testtesting]]ing
*[[Session-based test]]ing
 
tuyy
== References ==
{{soft-eng-stub}}
{{reflist}}
 
[[Category:Software testing]]
 
 
{{softSoft-eng-stub}}