Vsts for testers Reading Notes (25)

Source: Internet
Author: User

I. Overview

2. You can use a general test to wrap legacy tests and other external programs. After this operation is performed, the test engine treats the test as any other test type.

2. Use a general test to package existing tests, programs, or third-party tools that can run from the command line and return pass or fail values

2. General testing is a simple extension of team edition for testers; they allow you to run tests other than predefined Test types (including Web Testing, load testing, unit testing, manual testing, and Sequential Testing), such as previous and custom tests.

2. PASS command line parameters

You can pass command line parameters to the program packaged in the general test.

2. Deploy other files

If other support files are required during testing, you can deploy these files before running the test.

2. Use the summary result File

This mechanism allows you to report specific and detailed test results.

If the summary result file is used when you remotely run a general test, you cannot view the results immediately. For general tests, you must run all tests in the test run before you can view the test results, even if the general test has already been completed.

2. Create a general test

2. indicate the path and file name of the testing, program or third-party tool to be packaged as a general test under "specify existing programs to be packaged as general tests (Test, test tool or test adapter )"

2. Enter one or more parameters to be passed under "pass to common test command line parameters. Separate multiple parameters with spaces

2. Specify all files required for proper test under "Other files to be deployed with General tests"

2. Specify the executable file as the directory to be used in the working directory when running in the "working directory"

2. Name of the result File

2. The test returns 0 or other numbers. The test engine interprets 0 as "passed", and other numbers as "failed ".

 

Download evenodddemo

Command Line Parameters

2. A single parameter can be used for simple scenarios.

 

2. Multiple parameters are separated by spaces.

Environment Variable

Use environment variables to display the path in the following area

2. Target execution

2. Command Line Parameters

2. Location of the summary result File

2. Deployment items

2. You can use any system-customized or custom environment variables, such as systemdrive, ProgramFiles, and USERPROFILE.

2. The most useful variable is comspec. Comspec is the full name of the CMD command. You can use comspec to run the command prompts script such as the. Bat suffix.

2. environment variables are case insensitive.

But myexecutabledir is not defined. the test engine considers this string as myexecutable.exe and tries to run it in the deployment directory. The preceding figure shows that myexecutable.exe has been deployed.

2. You can use an environment variable to control the folder where the test engine runs the test. For example, if you set the myexecutabledir directory to E: \ builds \ drop \... \ bin \, the test engine tries to run files in this location. This is useful for tests that cannot be moved. This is very suitable for testing and stored in source code management.

3. Collect code coverage

Similar to manual testing, use loadtest config to configure code override. For more information, see manual testing.

4. Create and use the summary result File

2. By using the summary results file, a specific detailed test result can be generated for a general test.

2. The Digest result file is an XML file that conforms to the specific XML architecture.

Step 2

The purpose of using the XSD tool is to use the selected language for the XSD utility to output a class containing specific parameters and attributes

 

Edit the program to be packaged as a general test. Use the class generated by XSD to add parameters and attributes to the general test class.

Create a general test to wrap the existing program, click "Summary Result file" under "result Settings" in the general test, and specify the path of the folder where the summary result file is to be placed.

Result file example

2 <? XML version = "1.0" encoding = "UTF-8"?>

2 <summaryresult>

2 <testname> parenttest </testname>

² <Testresult> passed </testresult>

2 <innertests>

2 <innertest>

2 <testname> innertest1 </testname>

² <Testresult> passed </testresult>

² <Errormessage> everything is fine. </errormessage>

2 <detailedresultsfile> D: \ Alibaba ents and Settings \ results.txt </detailedresultsfile>

2 </innertest>

2 <innertest>

2 <testname> innertest2 </testname>

² <Testresult> failed </testresult>

² <Errormessage> something went wrong. </errormessage>

2 <detailedresultsfile> D: \ Alibaba ents and Settings \ results.txt </detailedresultsfile>

2 </innertest>

2 </innertests>

2 </summaryresult>

5. Run a general test

2. Test view: select general test.

2. Test manager. Select general test.

2. Test Results

When the value of 0 is returned for the executable program in the test package, the test is successful. If any other value is returned, the test fails.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.