51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2832|回复: 2
打印 上一主题 下一主题

HELP!!!!

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-4-9 15:45:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
求救:
我的程序框架如下,编的是一个通用的测试框架:
        unload();
        GUI_unload_all();
        #get the test dir
        static test_director = getvar("searchpath");
        test_director = substr(test_director,match(test_director,"<") +1,match(test_director,">") - 2);
       
        static path_lib = "\\path.lib";
        static utils_lib = "\\utils.lib";
        load(test_director & path_lib);
        load(test_director & utils_lib);
        #global variable is defined in the path.lib
        const RADIO_CONFIG_GUI = "\\waris_conv_win_radioconfiguration\\radioconfiguration.gui";
        #const TABLE = "waris_conv_win_radioconfiguration_10.xls";#data base
        static cps_port = "";
        #select the tab WIN_TREE => LIST_TREE => SEL_PATH
        #                                    => WIN_TAB => TAB
        const LIST_TREE = "SysTree";
        const WIN_TREE = "TreeView";
        const SEL_PATH= "Device at COM4 Port;Radio Configuration";#the path to select the window which will be tested.
        const WINDOW = "RadioConfiguration";#The window include the tab
        const WIN_TAB = "RadioConfigurationTab";#The fram of the tab
        const TAB = "DefaultDisplay";#the table of the window
       
        #initial the environment
        initial_environment();
        if(GUI_load(test_director & RADIO_CONFIG_GUI) != E_OK)
        {
                tl_step("load gui",1,RADIO_CONFIG_GUI & " failed");
        }

        rc = check_box_test( WIN_TREE, LIST_TREE,SEL_PATH, WINDOW,
                                                                    WIN_TAB,TAB,TABLE, cps_port );
        if(rc != E_OK )
        {
                tl_step("Test status",1,"Failed");
        } else {
                tl_step("Test status",0,"Successful");
        }

        #close the table
        ddt_close(TABLE);
        clear_environment();
        unload();
        GUI_unload_all();
        GUI_close_all();
然后用
call_close "d:\\test"("data1.xls");
call_close "d:\\test"("data2.xls");
第一个call_close 语句可以顺利执行但是当执行的第二个call语句时在
        if(GUI_load(test_director & RADIO_CONFIG_GUI) != E_OK)
        {
                tl_step("load gui",1,RADIO_CONFIG_GUI & " failed");
        }
这个地方load gui文件出错
请高手指点。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2008-4-9 16:39:46 | 只看该作者
补充一下错误码是:-1007
说文件可能已经打开,但我查看了一下没有打开
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2008-4-10 20:36:58 | 只看该作者
就执行loadGUI的时候有问题吗?
我把你的程序简化成
unload();
GUI_unload_all();      
if(GUI_load(test_director & RADIO_CONFIG_GUI) != E_OK)
{
       tl_step("load gui",1,RADIO_CONFIG_GUI & " failed");
}
unload();
GUI_unload_all();
GUI_close_all();
用call_close "d:\\test"();调用没出现问题,(call_close加上"data1.xls"这个参数我不明白,就给去了。)
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-20 07:57 , Processed in 0.085606 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表