草庐IT

test_script

全部标签

unit-testing - Kotlin 中的模拟扩展功能

如何在测试中使用Mockito或PowerMock模拟Kotlin扩展功能?由于它们是静态解析的,应该将它们作为静态方法调用还是非静态进行测试? 最佳答案 我认为MockK可以帮助你。它也支持模拟扩展功能。您可以使用它来模拟对象范围的扩展:dataclassObj(valvalue:Int)classExt{funObj.extensionFunc()=value+5}with(mockk()){every{Obj(5).extensionFunc()}returns11assertEquals(11,Obj(5).extensio

windows - Windows 上的 Test-Kitchen serverspec 测试异常

当使用chefgeneratecookbookhello命令时,生成的serverspecspec_helper.rb文件将不适用于Test-Kitchen1.4.1和windows。kitchenverify命令将在windows平台上抛出以下内容:C:/Users/vagrant/AppData/Local/Temp/verifier/gems/gems/specinfra-2.37.5/lib/specinfra/backend/exec.rb:98:in`spawn':Nosuchfileordirectory-/bin/sh-cls\/etc/arch-release(Err

python - 测量命令 : measure python script execution time

我发现我可以用这个命令测量Windows上的执行时间:Measure-Command{start-processpython.\script.py-Wait}而且效果很好。不幸的是,当我尝试运行一个带有一些(位置和可选)参数的脚本时,我收到一条错误消息,带有Measure-Command{start-processpython.\script.pyfile.txt100-Wait}我得到错误:Start-Process:Apositionalparametercannotbefoundthatacceptsargument'file.txt'.没有Measure-Command一切正常

windows - 触摸屏模拟器 : Are there any windows simulator to test application in touch screen environment

我想在触摸屏环境中测试我的应用程序。我的应用程序是一个在asp.net(.netframework3.5)和flash中构建的网站。我想使用WindowsXP/Vista/7的模拟器测试我的应用程序。请告诉我是否有Microsoft或任何第三方发布的任何模拟器,我可以在其中测试我的应用程序。谢谢维奈·潘迪 最佳答案 您可以使用Windows8和VisualStudio2012Express,当您通过VS运行Windows商店(又名Metro)应用程序时,可以使用Windows模拟器。但是您可以在没有VS的情况下运行模拟器,并通过它运

windows - 这个 "Can' t open perl script : No such file or directory"是什么原因

如果我在cygwin(在windowsxp平台上)中运行此命令perl/cygdrive/c/Sagar/New_ISP/isp_fw_11_24_Test_V1/Scripts/windows_test_report_tool/testdbmerge.pl我收到这个错误:Can'topenperlscript"/cygdrive/c/Sagar/New_ISP/isp_fw_11_24_Test_V1/Scripts/windows_test_report_tool/testdbmerge.pl":Nosuchfileordirectory.这是为什么?

java+selenium web auto test environment build

1.http://selenium-release.storage.googleapis.com/index.htmlselenium2.53.1downloadpath, selenium-java-2.53.1.zip,decompression,openeclipse,newajavaproject,createanewfoldernamed'lib',copyall.jarfilefromthe decompressionfoldertolibfolder, selectall.jarfileineclipse,rightclick,clickBuildPath,clickAddtoB

php - Apache mod_rewrite : RewriteMap directive using PHP script on Windows machine

这让我抓狂。我似乎无法让RewriteMap指令在Windows上为php脚本工作。这是我的httpd.conf文件中的相关片段:RewriteEngineonRewriteMaprouter"prg:C:/dev/web/www/routing.php"RewriteRule(.*)${router:$1}我的简单php脚本如下所示:#!C:\ProgramFiles\PHP5.3.2\php-win.exe当我尝试启动Apache时,我在错误日志中收到以下行:[error](OS193)%1isnotavalidWin32application.:mod_rewrite:could

windows - 通过 Windows Script Host 使用 UTF-8 编码运行 JScript 或 VBScript 文件时出现问题

我不确定我是否做错了什么,但如果我将它保存在.js中,我似乎无法通过WindowsScriptHost运行以下JScript使用UTF-8编码的文件:varname="Helloworld!";WScript.echo(name);当我运行它时,它给我这个错误:请注意,如果我使用ANSI编码保存脚本,脚本运行良好。WindowsScriptHost引擎是否与UTF-8编码不兼容? 最佳答案 VBScript和JScript的可能源文件编码是ANSI或UTF-16(LE)。不能使用UTF-8。

windows - 电源外壳 : ftp directory listing (help on a script)

我正在尝试创建ftp目录的ListView。到目前为止,查看部分还可以,但我无法操作我返回的数据。这是我使用的脚本;[System.Net.FtpWebRequest]$ftp=[System.Net.WebRequest]::Create("ftp://ftp.microsoft.com/ResKit/y2kfix/alpha/")$ftp.Method=[System.Net.WebRequestMethods+FTP]::ListDirectory#Details$response=$ftp.getresponse()$stream=$response.getresponsest

android - "Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk"

我搜索了整个网络(我认为)。和它说的我试过但仍然没有运气不工作。我在cygwin和windows下测试它这是我的项目文件/目录:D:\Java_2\workspace_indigo\JniTest\.classpathD:\Java_2\workspace_indigo\JniTest\.projectD:\Java_2\workspace_indigo\JniTest\AndroidManifest.xmlD:\Java_2\workspace_indigo\JniTest\assetsD:\Java_2\workspace_indigo\JniTest\binD:\Java_2\w