tuzig / capacitor-ssh-plugin

An ssh plugin for hybrid apps, supports both iOS and Android.
MIT License
1 stars 2 forks source link

Add automated tests #3

Open daonb opened 2 years ago

daonb commented 2 years ago

This issue is about the infrastructure and tests needed to ensure the plugin works properly. The "lab" is made from a real iPad (until we fix #1) and local ssh daemon listening on port 22 and accepting the jrandom user.

The preferred architecture is Appium driving XCUITest. A good first step is to read this doc.

The testing suite

The testing suite is based on Terminal7's usage scenario and the #4 bug. Steps 1-5 are expected to pass while the bug could fail the rest of the steps:

  1. Open a session using jrandom@localhost:22
  2. Open a channel
  3. Run a shell over the channel
  4. verify the shell can echo "hello world"
  5. repeat 6 times steps 2-4
  6. exit a shell
  7. verify a random remaining shell can echo "hello world"
  8. repeat 6 times steps 6-7
IssueHuntBot commented 2 years ago

@daonb has funded $177.00 to this issue.


daonb commented 2 years ago

It's best to start by coding an Appium based testing suite and submitting it for review before working on the infrastructure.

IssueHuntBot commented 2 years ago

@daonb has funded $23.00 to this issue.


pathange-s commented 2 years ago

@daonb I am interested to work on this issue. This will be the first issue I will be resolving via IssueHunt. May I know if I will be funded for solving this issue ? Also, will I need a mac device for this ?

daonb commented 2 years ago

Hi @pathange-s , welcome! I love issue hunts. Once paid $50 for one line of CSS and it was worth it. This one is more complicated and it probably includes a lot of time in XCode

If your PR is approved, you'll get the funds. But before approving, I want to have it running on my dev environment of a MacOS and an iPad. The Appium test runner will be using XCUITest to automate the connected iPad. I hope you can get a similar env as without both a Mac and iPad you can't develop this.

There's a small chance someone else will open a PR before you do. As of now I don't know of anyone else who joined the hunt so you should be OK.