顯示具有 epf 標籤的文章。 顯示所有文章
顯示具有 epf 標籤的文章。 顯示所有文章

星期三, 6月 24, 2020

[eggplant] 客戶問題: 無法透過RDP連線處理


方法一

To enable RDP connection debug logs:
1.    Create an environment variable in Windows on the EPF machine - WLOG_LEVEL and give it a value DEBUG.
2.    Create a script in EPF that connects to a SUT using its name in the Connection List:
Connect “WIN-DS-EGGPLANT-SC”
Log ConnectionInfo()
Log “Waiting for 30 seconds…”
Wait 30
Disconnect
3.    Run the script in cmd using runscript:
 runscript.bat --commandlineoutput yes C:\CodeRepository\Suite-1.suite\Scripts\ConnectSmartCardTest.script

4.    Copy the cmd output to a text file.


方法二

The RDP DLLs that come with the newer versions of Eggplant Functional are different from the ones that come with version 18. There are some security restrictions on the SUT machines that do not allow the connection from EPF.
To try to overcome this, please try the following:

Try entering the hostname of the SUT instead of its IP address and see if it makes a difference. If not, try the following:
1. Quit Eggplant Functional.
2. Open a cmd prompt and go to the EPF installation directory.
3. Enter the following command:
defaults write Eggplant -rdpNlaSecurity NO
4. Open EPF again and try to connect.
5. If that doesn't help, quit EPF again and try the following command:
defaults write Eggplant rdpRdpSecurity NO

星期四, 4月 23, 2020

[Eggplant] 使用shell指令執行Java Jar

測試如何shell執行java包出的jar檔應用,並把執行結果取出。

測試一般jar檔執行

MacBook-Pro-8:eggplant_cmd bigd$ java -cp JarDemo.jar com.test.jardemo.TestJar "Hello World" "Ken"

輸入參數0:Hello World

輸入參數1:Ken


//存放shell輸出的東西
set destinationFile to "/Users/bigd/Downloads/shellOutput.txt"

//Users/bigd/Downloads/eggplant_cmd
shell "java -cp /Users/bigd/Downloads/eggplant_cmd/JarDemo.jar com.test.jardemo.TestJar 'Hello World' 'Ken' >"  & destinationFile

put file destinationFile into shellOutput
//LogSuccess file destinationFile
log shellOutput

//砍掉檔案
delete file destinationFile



參考

其他你感興趣的文章

Related Posts with Thumbnails