You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clu-getstart.md
+47-3Lines changed: 47 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -88,9 +88,53 @@ To test on osx/linux boxes, do #1, open `<repo-root>\drop\clurun`, you should se
88
88
Testing will consist of scenario tests and unit tests. Scenario tests should be written in a form of an example and be available in `.ps1` and `.sh` formats.
89
89
90
90
#### Scenario Tests
91
-
- Scenario tests should be saved under `./examples` directory and grouped by the package or service area. Each scenario tests should consist of both `.ps1` and `.sh` files and should cover "P0" scenarios.
92
-
93
-
##### Bash Tests
91
+
- Scenario tests should be saved under `./examples` directory with one directory per package. Each scenario tests should (eventually) consist of both `.ps1` and `.sh` files and should cover "P0" scenarios.
92
+
93
+
##### XUnit Automation For Bash Scenario Tests
94
+
- The ```Commands.Common.ScenarioTest``` project contains classes that enable executing bash scenario tests in Visual Studio, or cross-platform using dnx.
95
+
96
+
- To implement an xunit bash scenario test you must
97
+
- Add a ```[Collection("SampleCollection")]``` attribute to your test class
98
+
- Add a field to your class of type ```ScenarioTestFixture``` and add a constructor that initializes it
99
+
```C#
100
+
[Collection("SampleCollection")]
101
+
publicclassSampleTestClass
102
+
{
103
+
ScenarioTestFixture_fixture;
104
+
publicSampleTestClass(ScenarioTestFixturefixture)
105
+
{
106
+
_fixture=fixture;
107
+
}
108
+
```
109
+
- Use the fixture in your test method to create a script runner for your directory and to run your test script:
- Set the environment variable 'TestCredentials' to a connection string providing the credentials to use during test execution. Possible fields include:
118
+
119
+
| Field | Description |
120
+
| ------------- |:-------------|
121
+
| Username | an OrgId user name |
122
+
| ServicePrincipal | a service principal name |
123
+
| Password | the password or application secret to sue for authentication |
124
+
| TenantId | (required for Service authentication) The tenant guid to authenticate against |
125
+
| SubscriptionID | (optional) Selects a particular subscription by id. If notprovided, thefirstlistedsubscriptionwillbeselected |
0 commit comments