2011-07-06 86 views
0

在Windows环境中测试复制命令会涉及哪些测试用例?如何在Windows环境中测试复制命令?

+0

通过测试复制命令,你的意思是什么?你是在说“Ctrl + C”还是命令提示符中的拷贝? – Balanivash

+1

除非你是MS的测试人员,这听起来像作业 – kinakuta

+0

http://www.computerhope.com/copyhlp.htm。这些东西是通过复制命令完成的...... –

回答

1

神圣的geez!测试用例可能有百万个,这些测试用例对于“复制”命令都是合法且唯一的。你最好的方法是提出不同的输入和场景领域。以下是我为每个分类提出了一些场景的领域。然后,当您开始在不同的域中进行测试时(例如,从通配符到只读网络文件的一组文件复制到网络共享),乐趣就开始了。

绝不是这是一个详尽的域列表或测试场景。但是应该让你开始......在大多数情况下,测试应该包括比较源文件和目标文件以验证内容匹配。

Copying between: 
    network share 
    A really slow network share across the Internet 
    partitions 
    disks 
    disks of different types (flash, usb, external sata, SSD, etc...) 
    directories 
    within the same directory 

Naming 
    Normal file name 
    Filename that exceeds 8.3 (verylongfilename.whatever) 
    Copying a very long file name, but referencing it by it's 8.3 name (copy verylo~1.wha d:\) 
    A full directory path that exeeds MAX_PATH (260) characters (e.g. c:\a\very\long\directory\name\that\goes\on\forever\in\length......foo.txt) 
    By absolute addressing (\\?\\c:\foo\foo.txt) 
    wildcards (e.g. *.* *.txt foo?.txt) 
    A filename with unicode characters 
    A filename with illegal characters in it (there are creative ways to get these files on disk) 

Attributes 
    Testing with different file attributes (read-only, hidden, system, archive, etc...) 
    Validate timestamp is preserved across copies 
    Validate timestamp is preserved across network file share copies when the destination machine is in another timezone 
    NTFS ACLs are preserved 

Addressing types 
    reference by absolute path (e.g. copy c:\some\directory\foo.txt c:\other\place\foo.txt) 
    reference by relative path (e.g. copy ..\..\documents\whatever\foo.txt subdirectory/foo.txt) 
    By absolute drive letter into current working directoroy of destination (with no path (e.g. copy foo.txt d:) 
    Network share mounted to a drive letter 

Failure cases, edge cases, and hack attacks 
    Try to copy a file onto itself (e.g copy c:\foo.txt c:\foo.txt) 
    Copy when the network share is down. 
    Unplug the network cable in the middle of a network file copy 
    copy to a read only directory 
    copy when the source file is locked. 
    copy the when destination file exists but the destination file exists and is read only 
    Detach the external disk right before the file copy starts 
    disk is near full (But would be full before the entire copy finishes) 
    disk is full 
    Unplug the power cable in the middle of the copy! 
    During a very long copy, start another copy with the same source file, but to another destination 
    During a very long copy, start another copy with a different source file, but the the same destination 
    During a very long copy, start another copy with the same source and destination files! 

File types 
    ascii file 
    unicode file 
    binary file 

Environments 
    RAID configurations 
    FAT and NTFS 
    Windows XP, Vista, 7, Server 2003, etc... (you can quantify this by asking the requirement of "which OS" up front) 
    Virtual Machine (VMWare, virtual PC, hypervisor, etc...) 
    Intel and AMD