Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ CodeArts TestPlan/ Best Practices/ Designing a Test Based on Requirements

Designing a Test Based on Requirements

Updated on 2024-11-13 GMT+08:00

Overview

The test design feature in the CodeArts TestPlan provides multi-dimensional test strategies and design templates. Based on different design inputs, there are two processes to generate the test scheme and test cases: requirement > scenario > test point > test case, and feature > scenario > test point > test case. The feature utilizes mind maps and heuristic testing to encourage testers to visually represent their test models. It also improves test design efficiency, optimizes test completeness, and helps testers reduce product test omissions during execution.

This function enables you to combine factors using multiple modes and algorithms, and generate test cases in batches from the resulting combinations. In addition, you can reference action and data factors to efficiently generate test cases in batches, freeing yourself from repeated writing of test cases of a test point. The test cases generated in this way are clear and unified in structure.

This section describes how to generate a single test case based on the requirement, and how to generate test cases in batches by using test factors.

Prerequisite

  1. You have created a project. This section uses a Scrum project as an example.
  2. You have created a requirement work item.

Generating a Test Case Based on Requirements

  1. Log in to the CodeArts homepage, search for your target project, and click the project name to access the project.
  2. In the navigation pane, choose Testing > Testing Design.
  3. Click Requirements on the left, select a requirement, and click Create in the upper left corner.

  4. The mind map page is displayed. Right-click the root node, and choose Add Subnode(Ins) from the shortcut menu. Change the subnode name to Mobile Testing.
  5. On the toolbar above the mind map, click to tag the node as a scenario. If is displayed next to the selected node, the scenario is added successfully.

  6. Right-click the Mobile Testing scenario node, add a subnode, and change the subnode name to Test the camera function of the mobile phone. On the toolbar above the mind map, click to tag the node as a test point. If is displayed next to the selected node, the test point is added successfully.

  7. Add a prerequisite subnode and a test step subnode to the Test the camera function of the mobile phone node, and then add an expected result subnode to the test step. Example:

    • Prerequisite: The mobile phone provides a personalized photographing mode
    • Step: Set the resolution to 800,000 pixels, and the mode to auto flash, auto ISO exposure, and motion
    • Expected result: Successful

  8. Right-click the Test the camera function of the mobile phone. node and choose Generate Case from the shortcut menu to create a draft case. If is displayed on the node, the operation is successful. In this case, a draft case is generated. Click . The case details are displayed on the right of the page.
  9. Right-click the node for which a case has been generated and choose Archive Case from the shortcut menu. The Archive Case window is displayed.
  10. On the left, select the test cases to be archived. On the right of the page, set Version, Case Library/Test Plan where the test case is to be stored, and Execution Mode, select a feature, and click Confirm. (The requirement selected during mind map creation is associated to this test case by default if you have subscribed to CodeArts Req.) If is displayed in the node, the operation is successful. You can find the test case on the Testing Case page. Click . The test case details page is displayed.

Generating Combinatorial Cases in Test Factor Center

To use the Test Factor Center function, create a factor library first. A project can have only one factor library. Go to the Testing Design page, and click Test Factor Center to access the factor library. You can create a test factor library either by creating new factors or importing existing ones.

Creating new factors

  1. Click the root directory in the factor library tree (create one if there is no library available), click , choose Create Directory, and enter a library name.
  2. Click the directory and click Create Factor.
  3. Enter a factor name, set Factor Type to Data Factor, click Add, set valid values and invalid values for the factor, and click Confirm.

    Configuration Item

    Mandatory

    Description

    Factor Name

    Yes

    Name of a data factor (1–500 characters).

    Factor Type

    Yes

    Default type: Data Factor.

    Factor Description

    No

    Brief description of a data factor. Max. 500 characters.

    Data Type

    Yes

    Default type: String.

    Valid Value

    No

    Elements of a data factor. Click Add to add more valid values.

    Invalid Value

    No

    Elements not supported by a data factor. Click Add to add more invalid values.

    Remarks

    No

    Max. 500 characters.

    For example, to test the camera function of a mobile phone, create data factors Pixels, Flash mode, ISO, and Scene mode, as shown in the following figures.

  4. To create an action factor, configure the following information and click Confirm.

    Configuration Item

    Mandatory

    Description

    Factor Name

    Yes

    Name of an action factor (1–500 characters).

    Factor Type

    Yes

    Select Action Factor.

    Factor Description

    No

    Brief description of a data factor. Max. 500 characters.

    Prerequisite

    Yes

    Enter the prerequisites of an action factor. Max. 2,000 characters.

    Test Steps

    Yes

    Enter the step description and expected result. In the Step Description column, use ${Data Factor} to invoke data factors. Click + in the Operation column to add a test step.

    Remarks

    No

    Max. 500 characters.

    For example, to test the camera function of a mobile phone, the action factor Take a photo may be set as shown in the figure below.

Importing existing factors

  1. Go to the test factor center, select a directory, and click Import.
  2. Click Download Template, edit the downloaded file on the local PC, and upload the file.

    After the file is imported, directories and factor data configured in it are displayed in the factor library.

Generating cases in batches using test factors

  1. In the requirement tree, click a requirement, and click a mind map.
  2. Right-click a test point to be associated with the factor library, and choose Associate Factor Library from the shortcut menu.
  3. Select the target factor library directory, select useful factors, and click Confirm.

  4. Right-click the test point and choose Generate Combinatorial Case from the shortcut menu.
  5. Click Data Factor and select a combinatorial algorithm.
  6. Click Preview Combination to see the combinations. The following figure shows the combinations generated using the PairWise algorithm.

  7. Select combinations and click Next.

  8. The Configure Test Case page is displayed. Check the prerequisites, steps, and expected results of the action factor. Edit the information as required. Click Confirm to generate combinatorial cases.
  9. Click the case icon in the test point.
  10. Select cases and click Archive Cases.
  11. On the left, select the test cases to be archived. On the right of the page, set Version, Case Library/Test Plan where the test case is to be stored, and Execution Mode, select a feature, and click Confirm. (The requirement selected during mind map creation is associated to this test case by default if you have subscribed to CodeArts Req.)
  12. Click in the upper left corner of the page. Choose Testing > Testing Case to check the archived cases in the case list.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback