Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write pester based E2E tests for Windows #330

Closed
10 of 17 tasks
manojampalam opened this issue Sep 20, 2016 · 0 comments
Closed
10 of 17 tasks

Write pester based E2E tests for Windows #330

manojampalam opened this issue Sep 20, 2016 · 0 comments
Assignees

Comments

@manojampalam
Copy link
Contributor

manojampalam commented Sep 20, 2016

Requirements:

  1. Tests should execute windows Nano server, Linux, windows full, and windows subsystem for Linux to make sure the win32 tools are pair with those on Linux and windows subsystem for Linux.
  2. The remote tests should run cross platform windows-Linux, Linux-windows.
  3. Tests should cover all the ssh subsystems (including PSRP over SSH)
  4. Tests should support running over local loopback (for CI) as well as to other systems (daily run).

Test Design:

PowerShell is supported in Nano server, Linux, Windows Full so it is chosen as the develop language of OpenSSH tests.
For more information about PowerShell, please read Powershell

Tests should run on various platforms.
PowerShell Pester testing tool which run cross over platforms is used for writing test cases.
To use the tool please read Pester Guides and Writing Pester Tests Guidelines.

Although PowerShell provides some cmdlets to access some of the resource across platforms, other system resources still require various tools/command on various platforms, for example, local account and group management, the tool used to secure host key in agent, the approach to get a particular profile location.
A platform abstract layer PowerShell module (PlatformAbstractLayer.psm1) is designed to abstract that usage so the test itself does not need to know the differences.
Current limitation: the Win32_OpenSSH still in a pre-release state and not completely pair with OpenSSH tools (for example, the generated keys are not at the right location. ssh.exe is required be in the same location of the tests. ).
The current focus of the test develop are to run it on windows but the approach/design it takes should work on other platforms.
There will be some small code refactoring/changes when stabilize the code on Linux.

Remoting

Eventually the tests should run on multiple machines.
This is not current test focus, but the test is designed to be refactored/configured to run cross machine when the remoting infrastructure is ready.

Test Coverage:

The following should be covered:

  • Basic tests of all supported command line parameters for all binaries are paired with those on linux, includes:
    • scp
    • ssh
    • sftp
    • ssh-add
    • ssh-agent
    • ssh-keyagent
    • sshd_config
  • Basic tests of Powershell PSRP over open SSH scenarios.
  • Port forwarding scenarios
    • Basic tests
    • complex test scenarios, including cross platform
  • Remote shell scenarios
  • Agent forwarding scenarios
  • File transfer scenarios
    • Basic tests
    • complex test scenarios, including cross platform
  • Perf scenarios
  • Fuzz testing
  • Todo: Need to look into Project Springfield to find out if we can use it against openssh.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants