简体   繁体   中英

Connect to Linux server from Windows (Java)

I'm using Eclipse in Windows. I have an application that should be tested on a Linux server. I usually connect to the server via winSCP and putty, but I want to make automated tests.

My questions is: How do I connect to Linux server from Windows to test the application?

In general, the better way is using ci tool like Jenkins . If you want do it by yourself, just act as ci server or plan your test procedure.

Act as ci :

on-development-host:

  1. commit the source code to verion control system

on-linux:

  1. check any changes in the version control system
  2. get latest source code from version control system (git pull or svn update, or any other vcs tool you used)
  3. build app from source code (use build tool: ant or maven)
  4. run test-cases and send test report

Arrange test procedure by yourself :

  1. winscp to linux from your computer
  2. run test-cases and send test report

There is a problem in winscp. It is a gui tool and is difficlut to automate. Ant sshexec and scp task is better for automating test.

您可以使用plink非交互地在服务器上运行命令。

去检查是否有JSCH连接,您可以使用它运行多个命令甚至脚本(从系统加载它们之后)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM