《Qt:2023软件测试初学者指南(英文版)(15页).pdf》由会员分享,可在线阅读,更多相关《Qt:2023软件测试初学者指南(英文版)(15页).pdf(15页珍藏版)》请在三个皮匠报告上搜索。
1、A beginners guide tosoftware testingGet everything you need to know to make educateddecisions around manual testing,automated testing andsoftware quality management.Automate.Accelerate.Deploy Quality.3Introduction to Software QualityManagement(SQM)SQM,or Software Quality Management,refers to the adm
2、inistrative processesinvolved in creating software.SQM is a multi-faceted process that begins with aproduct concept and continues through its conception,testing,and public release.The main components of SQM are Quality planning,Quality Assurance(QA),QualityControl(QC)and software testing.1.A beginne
3、rs guide to software testingQt GroupSoftware quality management begins during the planning phase when testerscreate goals and objectives for the software and create a strategic plan to helpachieve those goals.Quality planning is the backbone of SQM since it establishesthe parameters by which the who
4、le process will be carried out.Quality planningQuality Assurance(QA)is a part of Software Quality Management(SQM)thatensures the software product is built according to an approved designspecification.Testers follow the development process,checking for conformanceto standards and ensuring that all de
5、sign aspects are working correctly.Quality Assurance(QA)Quality control is the testing phase where defects are identified,functionality isevaluated,and other tasks are performed to iron out kinks and make final minoradjustments.The ISTQB defines quality control as“activities designed to evaluate the
6、 quality ofa component or system.”While Quality Assurance is about creating andmaintaining the process that leads to the end-result,QC examines the finaloutcome it looks at the quality of the end-products.The terms quality assurance and quality control(QC)are often usedinterchangeably,albeit incorre
7、ctly as QA is process-oriented and focused onpreventing defects,and QC is product-oriented and focused on identifying defects mainly by testing.Quality Control(QC)Software testing is just one subset of Quality Control(QC)and is a process thatassures the quality of software products by testing and va
8、lidating them beforebeing released to users.It helps ensure that the end product is of the best qualitybased on design,functionality,and specifications and meets defined standards(such as ISO 9000,CMMI,TMMI,etc.).Software testing also helps companies avoid making expensive mistakes bycatching flaws
9、before launch.These measures all contribute to giving consumersthe best experience possible.In this guide,well focus predominantly on the final aspect of SQM,testing.Software testing4Software testing can be manual or automated,depending on the products nature.As the name suggests,manual testing requ
10、ires human interaction and testingwithout automated tools.QA testers follow a test plan and interact with theapplication as though they were a genuine user to analyze the functionality andexperience of the program.On the other hand,automated QA testing uses automation tools to execute testcases.Ther
11、efore,it is more suitable for large-scale testing and helps to speed uprepetitive testing tasks.What types of tests can be performed?Validation:To determine whether the product satisfies the specific needs ofthe user or not.It also helps show that the program works as intended.Documentation:To keep
12、track of activities related to the development andtesting processesAssuring Quality of Products:To ensure that products meet customerexpectations regarding functionality,performance,safety,and durability.Quality Improvement Plan:To effectively monitor and control quality acrossthe software developme
13、nt life cycle(SDLC)Functions of quality assuranceIn the next section,well discuss manual testing in detail and exactly how youcan use it for specific use cases,including an introduction to using Test Center formanual testing.There are several industry certifications that organizations can earn to pr
14、ove thatthey meet industry standards and maintain quality practices.Clients also use thesecertifications as a way to evaluate software vendors.ISO 9000:International standards for establishing and maintaining anadequate quality assurance(QA)system for businesses.To be ISO 9000certified,an organizati
15、on must be audited on its functions,products,services,and processes.Capability Maturity Model Integration(CMMI)Level:Used to analyze thematurity of an organizations processes and provide recommendations forprocess improvement.TMMI:A five-level model that provides a framework to help companies assess
16、the maturity of their testing processes and optimize them.Quality assurance certificationsQt GroupA beginners guide to software testing5Testing types used in manual testing processesThe role of manual testing insoftware developmentCompanies carry out manual software testing to ensure their new appli
17、cations orproducts are free of bugs and defects before being released to the public.Itinvolves having a Quality Assurance(QA)team interacting with the program as auser would,reviewing the behavior of software against predefined expectedbehavior,and reporting any issues they may find.Click on buttons
18、 or links to see if they work correctly.Check if users can enter data into text fields.See if search bars,drop-down menus,and navigation is working.If a company was launching an app,for example,then the QA team would have to:Black Box testing2.This method,also called behavioral testing,helps to look
19、 at the app from theperspective of its intended users.Black box testing shields the QA team fromknowledge of the programs inner code.By simulating real-world user actions,heapps functional and non-functional behavior can be tested confidently and helpfind any bugs that have gone unnoticed.White box
20、testing,also known as transparent box testing or structural testing,isperformed when the tester has access to and is aware of the softwares underlyingstructure and logic.The tester selects inputs,conducts the test using code,anddetermines outputs.Its goal is to make the application more secure while
21、enhancing its aesthetics and usability.Note:You might come across the term Gray box testing this simply refers to acombination of Black Box and White Box testing.White Box testingAlso known as module testing or component testing,unit testing tests each unit orcomponent of an applications source code
22、 to ensure that each function works asplanned.Since it requires a comprehensive understanding of the programsarchitecture and code,developers typically execute this type of test rather thantest engineers.In addition to making error detection and prevention morestraightforward,it also reduces debuggi
23、ng.Unit testingQt GroupA beginners guide to software testing6Integration testing evaluates programs with several integrating components.It iscarried out after unit testing and seeks to find issues with the interfaces and theirinteractions.Integration testingSometimes referred to as end-to-end testin
24、g,system testing is performed afterunit testing and integrating each component to test the system as a whole.Itvalidates the final application by contrasting it to the initial requirements.System testingAcceptance testing is where the actual end-user verifies that the applicationsatisfies their need
25、s and meets the agreed-upon requirements typically in thelast phases of the project.Acceptance testingStep-by-step:how to do manual testingThe project requirements are examined to check for client expectations,whatneeds to be done and to know what the expected behavior of the softwareshould beA test
26、 plan is madeTest cases that meet the requirements and cover various scenarios are createdTest cases are executed to identify any issuesAny issues found are reported and repairedOnce repaired,the failed tests need to be rerun to validate the fixesQt GroupA beginners guide to software testing7Manual
27、testing with Test Center2.1.Test Center is a centralized,compact platform for managing test results andintegrating testing throughout the entire development cycle.It comes with a results dashboard that serves as a consolidated hub for storing,tracking and evaluating test results gathered at every st
28、age in a projectsdevelopment.The built-in statistical reporting features also make it easy to assessthe overall health of development projects over time and as they progress.The test management page has all the necessary information to generate manualtests,making creating and maintaining tests a bre
29、eze.The text editing feature comes with markdown support,saving time andeliminating laborious text editing.In addition,attachments and in-line images canbe used,allowing testers easy access to all relevant data and documentation whilecarrying out manual tests.Another helpful tool is shared steps,all
30、owing you toreuse existing stages.This is especially helpful for manual testing that needsdistinct setup procedures.Qt GroupA beginners guide to software testing8Test Center 2.0 introduced improved integration with Jira,especially issue creation,by supporting various custom Jira fields.Additionally,
31、the release of Test Center 3.0earlier this year supports Coco coverage reports,enabling users to browse andanalyze their code coverage reports directly from within the Test Center.It also hasthe enhancements of earlier versions of the Test Center.When testers find defects,they can quickly create iss
32、ues on Jira while doing manualtests within Test Center.Bugs created during manual testing will be accessible to allsystem users.In particular,shared steps ensure that errors discovered in earliertest runs will also be accessible to other testers.In Test Center,manual test cycles are conducted in bat
33、ches.This connects manualand automated tests.When a batch of manual testing is complete,thecorresponding results will automatically be reflected in the relevant result views.Managing a test cycleThe execution overview page summarizes the status of all manual tests and howfar along in the cycle they
34、are.Depending on the available testers,manual testingcan also be assigned or reassigned here.Similarly,testers can utilize this view to see a run-down of all the assigned manualtests and initiate the manual testing process.Execution overview also enablescompleted test cycles to be reviewed and easil
35、y rescheduled if they need to bererun.Manual testing is just as simple to execute as it is to create.You can use the sametext-editing tools you used to create your tests to run them.Testers can easily add descriptions,screenshots,or other attachments to theobserved manual test results if they spot a
36、ny errors.This makes it easy for themto document a test failure with supporting information.Issue tracking&traceabilityManual test executionQt GroupA beginners guide to software testing9Benefits of automated testing insoftware development3.Automated testing is the process of using scripted sequences
37、 to execute a testcase suite.Examples of languages used by QA testers are Python,JavaScript,andRuby.Due to Test Centers dedicated API-based import mechanism,those alreadyhandling manual tests in Zephyr or Xray can easily switch to Test Centers manualtesting with little configuration.It is also possi
38、ble to import Gherkin feature files,which eases the transition for users who have documented their manual tests inthis language.Next,well dive into automated testing,four reasons to use automated testing,and a run-down of how to use Squish for automated testing.Shifting from other manual toolsQt Gro
39、upReasons to use automated testingCost-effective:Automation testing reduces the overall cost of testing byeliminating many manual tests,which can be time-consuming and expensiveSpeed:Automatic tests can run faster than manual tests because they dontrequire human interaction or input.As such,automati
40、c testing can produceresults much more quickly.Lower risk:Manual testers often make mistakes when running their testcases,which may not happen if testers use automated tools.Improved product quality:Having fewer bugs in your software means a betteruser experience for customers and clients,increasing
41、 sales for businessesusing your software.1.2.3.4.The script is employed to test for bugs,defects,and any other errors that couldoccur during the development of a product.After completing the test,it produces areport outlining its findings,which can then be compared to the results of previoustests.Th
42、e main benefit of automated testing is simplifying manual labor into a setof scripts that can be executed repetitively at any time of day.A beginners guide to software testing10What kinds of tests should be automated?To maximize test automation ROI,you must choose the most suitable tests to beautoma
43、ted.Tests that are vulnerable to human errorTests that are repetitive and monotonousExtensive tests that necessitate the use of many data setsTests that cannot be carried out manually(for example,tests with extensivedata sets)Time-consuming testsBusiness-critical or high-risk tests that must be comp
44、leted consistentlyTests that must be performed on multiple hardware or software platformsHere are some considerations:Qt GroupIntegration testsEnd-to-end tests,commonly referred to as integration tests,determine if theindividual components of your application are functioning correctly.Theapplication
45、 models are integrated and tested to assess how effectively theyperform,allowing communication between modules to be evaluated.Automated Accepted Test(AAT)AAT is usually the last stage of testing.Finally,it tests the whole concept in aproduction-like setting to demonstrate that the application perfo
46、rms as intendedby the user.Types of automation testsCode analysisCode analysis is the process of checking source code for errors and vulnerabilities.This can be done with different tools,such as a dynamic or static analysis tool.Dynamic analysis is performed while the program is running,while static
47、 analysishappens before software testing begins without having to run the program.Unit testsEach programs function is tested in a unit test to ensure it functions properly.This ensures that the softwares components have been thoroughly tested beforethe final release.Smoke testsThe purpose of a smoke
48、 test is to provide a quick way to get a preliminaryassessment of the softwares functionality.If it doesnt pass the assessment,it ismarked as an unstable build and returned to the developers.Then,they canperform more tests to find the problems source.A beginners guide to software testing11Automated
49、testing with Squish 3.1.Automated testing is an integral part of the software development process.Testingis used to verify your applications functionality and uncover bugs that needsquishing.One solution for automated testing is(the aptly named)Squish,a tool that offersfunctional and visual(GUI)test
50、ing capabilities with support for Qt,Java,Web,Windows,iOs,Android and more.Squish provides an IDE and a framework that allows you to implement andautomate acceptance testing for GUIs and verify in real-time whether or not anapplication complies with its requirements.It can record test scripts writte
51、n in JavaScript and other languages and employsproperty-based object identification.It has two parts:the runner,which reads andruns scripts,and the server hooks,which control the application being tested.Qt GroupBroad support for automated GUI testingSquishs UI technology supports automated GUI test
52、ing of Windows,Mac,Java,and web apps,as well as mobile platforms like Android and iOS.Squish is easy to use and operate.Users can create test cases with standardprogramming languages like Python,JavaScript,Ruby,Perl,and Tcl.They also canuse the Gherkin testing language to test using the Behavior-Dri
53、ven Development(BDD)approach.Furthermore,Squish features automatic test script recording and recognition ofhigh-level interactions and objects instead of low-level events.All the tester hasto do is press the record button and then proceed with their work within the app.As soon as the actions are per
54、formed,Squish automatically creates a test script.Supports all major GUIs frameworksFull support for PC,mobile,web,and embedded platformsTest script recordingStrong object ID and verificationWell-integrated environmentSupport for behavior-driven developmentFull control with command line toolsSquish
55、features:Verification and recognition testsSquish has various verification and recognition features that make it easy to testyour application.For example,you can verify by object property,compare twoscreenshots,visually compare complex items information,geometry,topology,and aesthetic appeal,or perf
56、orm OCR-text and picture searches.A beginners guide to software testing12Testing Qt AppsQt is fully supported by Squish,which allows users to test Qt applications easily.Qt applications can be tested on one supported platform and run on anotherwithout changing the code.Squish usually just needs the
57、binaries.Squish also supports Qt Widgets,QML,and QtQuick controls in addition to typicaland complicated buttons,menus,lists,tables,and so on.Qt WebKit and Qt WebEngine-implemented embedded web content are also recognized.Whether its Qt and QML controls,models or other objects,Squish makes them allac
58、cessible.Users can also link test-script functions to Qt signals and Qt events sothat a test script can respond to application signals and events.Squish supports automated testing of basic gestures like touch,flick,swipe,andmore.Pinch and other complicated multi-touch movements are supported too.The
59、 Squish development team has invested a lot of time and energy in testing In-Vehicle Infotainment(IVI)apps using the Qt IVI module.Both C+and QML allowaccess to these vehicle features.In addition,a core API for adding new IVIfeatures and bindings to the Qt IVI module for testing vehicle interactions
60、 are alsoavailable.Qt GroupA beginners guide to software testingApplicationsBecause Squish can work with many kinds of software developed using advancedtechnology,the tool is popular in software development.In addition,it can be usedfor a variety of testing methodologies.For example,Companies can us
61、e Squish for user interface testing,functionaltesting,regression testing,and keyword-driven testing.Squish can also testapplications on various platforms like Android and Java.High consistency and minimal redundancy in testingExcellent reusability and scalability capabilitiesModifiable according to
62、the requirements of integrationHigh-performance and improved efficiency during the test execution phaseBenefits of Squish13Using Test Center to improve testmanagement3.2.Using a test result management platform,such as Test Center,can enhance bothyour test management and reporting capabilities.It hel
63、ps serve as a centralized,organized repository of tests and results from all tests.In Qt Test Center,you can view your automated and manual test suite statistics,visualize trends and analyze historical data of your test executions with built-in,automatic statistical reporting of your imported data.Q
64、t GroupSwitching from manual to automatedtestingManual testing is a way of emulating user behavior to ensure software works asintended.Although manual testing is more efficient for some situations,its notalways the best choice.From the complexity of managing a test environment tothe risk presented b
65、y human error,manual testing presents several roadblocks,prompting many businesses to reconsider whether it is the ideal option for theirnext project.Automated testing methods can help companies overcome these obstacles anddeliver more opportunities for testing in less time.4.A beginners guide to so
66、ftware testing14The Advantages of automation in testingLess time spent on routine testingBecause it takes so much time,testers can only cover limited testing territorymanually.Manual testing is also more challenging to scale as software grows morecomplex.Automated testing,on the other hand,expedites
67、 the quality assuranceprocess by eliminating the need for human intervention during routine tests likeregression testing.Increased test coverageWith a manual testing approach,you can only run so many tests before hitting theceiling,and the quality of those tests frequently relies heavily on the expe
68、rtise ofthe specific tester.In addition,due to the tester-specific nature,it is difficult toreplicate the same set of tests every time.Test coverage can be increased with automated testing,as unlike manual testing,automated testing can perform several tests simultaneously,on different setups,and wit
69、h varying parameters.Reduced risk for human errorHuman error is more likely to occur when individuals are involved in a manualtesting process.No matter how careful,no one is perfect.There may be instanceswhere someone skips a few steps,which may end up increasing their workload anddelaying the devel
70、opment process even more.As such,automated testing lessensthe likelihood of mistakes being made.Additionally,since every action isautomatically recorded,any problems may be found and fixed immediately.Qt GroupMaking the shift from manual to automated testingHere are some helpful tips for shifting to
71、 automated testing.Regression tests:These are extensive,recurring,and dependent on the sameinput variablesData-driven tests:Many functional tests require testing using multipledivergent data sets to evaluate a range of positive and negative cases Performance testing suites:Automated testing can be u
72、sed to speed up thetesting of system performance under varying conditionsAPI tests:Automated tests find flaws faster since they trigger API regressionswhenever the API is modifiedDecide which test cases should be automatedWhen planning to move to automated testing,determine how it can helpmaximize y
73、our teams efficiency.For instance,automating repetitive tests cansave you time and effort.A beginners guide to software testing15Your team should also be able to identify which test cases to automate andwhich not to.Some test cases are more effective when done manually or cannotbe automated,for exam
74、ple:Exploratory testing:Real users explore programs differently fromstandardized routines.Exploratory testing cant be automated since itrequires human cognition.UX testing:Automated tools must catch up when capturing intangibles likehow people feel about a product,how likely they are to utilize it,a
75、nd howaesthetically pleasing it is.Testing accessibility:This is best accomplished through manual testing,which examines the users interaction with the process or application.Determine the right frameworkThe efficiency of the test suite relies on the chosen framework.The right choicewill depend on t
76、he programmers skillset,the organizations softwaredevelopment procedures,and the nature of the software.For reliable outcomes,choose frameworks that mesh well with the skillsets ofyour team members.For example,JavaScript,Python,Ruby,Tcl and Perl areoften used for test automation frameworks.However,i
77、ts best to choose aframework that your team is most comfortable with to lessen the learning curve.Choose the right toolsShifting to test automation requires proper tooling.It is essential to choosesomething that meets your business objectives.Similar to frameworks,its essential to consider your obje
78、ctives not just for now,but in the future.For example,will the tool still exist in five years?Are newreleases issued frequently?How about support?Ultimately,the right tools should help you address your issues and accommodateyour evolving requirements.Qt GroupSet manageable goals and a quick learning
79、 curveTest automation is frequently hailed as the solution to many software testingchallenges.However,transitioning from manual to automated testing may bechallenging,so starting with manageable objectives is better.You could automate the most-used regression test suite or the longest and mosttediou
80、s one.First,identify recurring bugs and eliminate them,then graduallyimprove automation to cover more testing areas.A beginners guide to software testing16Measure the automated testing tools performance It is essential to have metrics to guarantee that your tool is effective and can meetyour testing
81、 goals.A few starting points could be to determine:How fast the turnaround time for executing tests is now,compared to beforeusing the toolThe difference in time spent on creating and revising testsIf the time for developing test suites has been shortenedQt GroupConclusionSoftware testing is not onl
82、y a requirement,but a critical factor in the marketsuccess of a product,and all future products a company might release.Implementing a software quality management strategy with a strong focus ontesting ensures that your company will follow best practices and that your finalproduct will meet or exceed the expectations of your users.5.A beginners guide to software testing