-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Current status
- V1
- Installation, uninstallation, default, all - demonstrate the format
We are covering several main areas
- install & uninstall
- checking of installed files on the filesystem
- checking of proper system variables setup
- checking of proper registry values
Why
I would like to use a more robust testing approach than bash. It's possible to write it in nUnit/junit or something similar. Aside from robustness, we'll get significantly higher testing coverage due to the creation of testing installation variants.
- current testing isn't robust
- a new addition needs a lot of boilerplate code
- significantly easier maintenance
Draft of implementation in nunit with TestCaseSource
public class WinTPSTests
{
// SetUp
// installation for every combination
[TestCaseSource(typeof(VendorConfiguration))]
public void CheckRegistryInstallation(VendorConfiguration configuration)
{
// foreach RegistyPaths in configuration && current JavaVersion
Assert.AreEqual(configuration.Registry, actualRegistryValue);
}
[TestCaseSource(typeof(VendorConfiguration))]
public void CheckFilesInstallation(VendorConfiguration configuration)
{
// foreach Files in configuration && current JavaVersion
Assert.AreTrue(File.Exists(configuration.File));
}
// TearDown for every combination
}
public class VendorConfiguration : IEnumerable
{
public IEnumerator GetEnumerator()
{
yield return new VendorSpecificConfiguration[]
{
Feature = "FeatureEnvironment",
new List<Path>() { "ABC", "XYZ"},
new List<String>() {"RegistryPath1", "RegistryPath2"}
JavaVersion = 20
};
yield return new VendorSpecificConfiguration[]
{
Feature = "FeatureJavaHome",
new List<Path>() { "ABC", "XYZ"},
new List<String>() {"RegistryPath1", "RegistryPath2"}
JavaVersion = 20
};
yield return new VendorSpecificConfiguration[]
{
Feature = "FeatureJarFileRunWith",
new List<Path>() { "ABC", "XYZ"},
new List<String>() {"RegistryPath1", "RegistryPath2"}
JavaVersion = 20
};
}
}
public class VendorSpecificConfiguration
{
public IEnumerator GetEnumerator()
{
string Feature;
List<Path> Files;
List<String> RegistyPaths;
int JavaVersion;
}
}
What’s missing?
https://github.com/adoptium/installer/blob/master/wix/README.md#features-available
- Reinstall?
- Per user installation?
- Upgrade?
- Do we need some runnable application?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels