Skip to content

Commit c55f61f

Browse files
committed
Merge branch 'release/0.13.0' into production
2 parents 2494f86 + e4cd210 commit c55f61f

53 files changed

Lines changed: 1128 additions & 349 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.appveyor.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ test:
1818
artifacts:
1919
- path: Tests\CSF.Screenplay.WebTestWebsite
2020
name: TestWebsite
21-
type: WebDeployPackage
2221
deploy:
2322
- provider: Local
2423
TestWebsite.deploy_website: true
2524
TestWebsite.site_name: "Test Web Site"
2625
TestWebsite.port: 8080
2726
after_deploy:
28-
- cmd: Tools\Appveyor.after_deploy.bat
27+
- cmd: Tools\Appveyor.after_deploy.bat

CSF-Software-OSS.snk

596 Bytes
Binary file not shown.

CSF.Screenplay.NUnit/CSF.Screenplay.NUnit.csproj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
<RootNamespace>CSF.Screenplay.NUnit</RootNamespace>
99
<AssemblyName>CSF.Screenplay.NUnit</AssemblyName>
1010
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
11-
<ReleaseVersion>0.12.0-beta</ReleaseVersion>
11+
<ReleaseVersion>0.13.0-beta</ReleaseVersion>
12+
<SignAssembly>true</SignAssembly>
13+
<AssemblyOriginatorKeyFile>..\CSF-Software-OSS.snk</AssemblyOriginatorKeyFile>
1214
</PropertyGroup>
1315
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1416
<DebugSymbols>true</DebugSymbols>
@@ -34,11 +36,11 @@
3436
<Reference Include="nunit.framework">
3537
<HintPath>..\packages\NUnit.3.7.1\lib\net45\nunit.framework.dll</HintPath>
3638
</Reference>
37-
<Reference Include="CSF.Reflection">
38-
<HintPath>..\packages\CSF.Reflection.1.0.1\lib\net45\CSF.Reflection.dll</HintPath>
39-
</Reference>
4039
<Reference Include="CSF.FlexDi">
41-
<HintPath>..\packages\CSF.FlexDi.1.0.0\lib\net45\CSF.FlexDi.dll</HintPath>
40+
<HintPath>..\packages\CSF.FlexDi.1.0.2\lib\net45\CSF.FlexDi.dll</HintPath>
41+
</Reference>
42+
<Reference Include="CSF.Reflection">
43+
<HintPath>..\packages\CSF.Reflection.1.0.3\lib\net45\CSF.Reflection.dll</HintPath>
4244
</Reference>
4345
</ItemGroup>
4446
<ItemGroup>
@@ -54,6 +56,7 @@
5456
<ItemGroup>
5557
<None Include="packages.config" />
5658
<None Include="CSF.Screenplay.NUnit.nuspec" />
59+
<None Include="readme.txt" />
5760
</ItemGroup>
5861
<ItemGroup>
5962
<ProjectReference Include="..\CSF.Screenplay\CSF.Screenplay.csproj">

CSF.Screenplay.NUnit/CSF.Screenplay.NUnit.nuspec

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>CSF.Screenplay.NUnit</id>
5-
<version>0.12.0-beta</version>
5+
<version>0.13.0-beta</version>
66
<title>CSF.Screenplay.NUnit</title>
77
<authors>CSF Software Ltd</authors>
88
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
@@ -11,13 +11,14 @@
1111
<description>Bindings and types for making use of CSF.Screenplay with NUnit Framework 3.x</description>
1212
<copyright>Copyright 2017</copyright>
1313
<dependencies>
14-
<dependency id="CSF.FlexDi" version="[1.0.0,2.0.0)" />
15-
<dependency id="CSF.Reflection" version="[1.0.1,2.0.0)" />
16-
<dependency id="CSF.Screenplay" version="0.12.0-beta" />
14+
<dependency id="CSF.FlexDi" version="[1.0.2,2.0.0)" />
15+
<dependency id="CSF.Reflection" version="[1.0.3,2.0.0)" />
16+
<dependency id="CSF.Screenplay" version="0.13.0-beta" />
1717
<dependency id="NUnit" version="[3.4.0,4.0.0)" />
1818
</dependencies>
1919
</metadata>
2020
<files>
21+
<file src="readme.txt" target="" />
2122
<file src="bin/Release/CSF.Screenplay.NUnit.dll" target="lib/net45" />
2223
<file src="bin/Release/CSF.Screenplay.NUnit.xml" target="lib/net45" />
2324
</files>

CSF.Screenplay.NUnit/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1818
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
1919

20-
[assembly: AssemblyVersion("0.12.0.0")]
20+
[assembly: AssemblyVersion("0.13.0.0")]
2121

2222
// The following attributes are used to specify the signing key for the assembly,
2323
// if desired. See the Mono documentation for more information about signing.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="CSF.FlexDi" version="1.0.0" targetFramework="net45" />
4-
<package id="CSF.Reflection" version="1.0.1" targetFramework="net45" />
3+
<package id="CSF.FlexDi" version="1.0.2" targetFramework="net45" />
4+
<package id="CSF.Reflection" version="1.0.3" targetFramework="net45" />
55
<package id="NUnit" version="3.7.1" targetFramework="net45" />
66
</packages>

CSF.Screenplay.NUnit/readme.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+

2+
Screenplay for NUnit : README
3+
-----------------------------
4+
5+
The first step in setting up a Screenplay integration is to create a "Screenplay integration
6+
config" class in your test project. This class must also be referenced by a
7+
ScreenplayAssembly attribute, which simply tells Screenplay where to find your config.
8+
9+
This integration config class is used to set up the optional components of Screenplay. These
10+
optional components might be:
11+
12+
* Reporting
13+
* Additional abilities
14+
* Dependency services
15+
16+
Here is a template/empty integration config class (including the required attribute) which you
17+
may use as the basis for your own:
18+
19+
// -- START OF TEMPLATE --
20+
21+
[assembly: CSF.Screenplay.NUnit.ScreenplayAssembly(typeof(YourNamespace.ScreenplayIntegrationConfig))]
22+
namespace YourNamespace
23+
{
24+
public class ScreenplayIntegrationConfig : CSF.Screenplay.Integration.IIntegrationConfig
25+
{
26+
public void Configure(CSF.Screenplay.Integration.IIntegrationConfigBuilder builder)
27+
{
28+
29+
}
30+
}
31+
}
32+
33+
// -- END OF TEMPLATE --
34+
35+
For more information about what may be placed in the Configure method, please refer to:
36+
37+
https://github.com/csf-dev/CSF.Screenplay/wiki/ConfiguringIntegrations

CSF.Screenplay.Reporting.Html/CSF.Screenplay.Reporting.Html.csproj

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
<RootNamespace>CSF.Screenplay.Reporting</RootNamespace>
99
<AssemblyName>CSF.Screenplay.Reporting.Html</AssemblyName>
1010
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
11-
<ReleaseVersion>0.12.0-beta</ReleaseVersion>
11+
<ReleaseVersion>0.13.0-beta</ReleaseVersion>
12+
<SignAssembly>true</SignAssembly>
13+
<AssemblyOriginatorKeyFile>..\CSF-Software-OSS.snk</AssemblyOriginatorKeyFile>
1214
</PropertyGroup>
1315
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1416
<DebugSymbols>true</DebugSymbols>
@@ -31,55 +33,55 @@
3133
</PropertyGroup>
3234
<ItemGroup>
3335
<Reference Include="System" />
36+
<Reference Include="System.Xml" />
37+
<Reference Include="System.Xml.Linq" />
38+
<Reference Include="Microsoft.CSharp" />
39+
<Reference Include="System.Core" />
40+
<Reference Include="System.Dynamic" />
41+
<Reference Include="HtmlAgilityPack">
42+
<HintPath>..\packages\HtmlAgilityPack.1.6.17\lib\Net45\HtmlAgilityPack.dll</HintPath>
43+
</Reference>
3444
<Reference Include="CSF.Caches">
35-
<HintPath>..\packages\CSF.Caches.1.0.0\lib\net45\CSF.Caches.dll</HintPath>
45+
<HintPath>..\packages\CSF.Caches.1.0.2\lib\net45\CSF.Caches.dll</HintPath>
3646
</Reference>
3747
<Reference Include="CSF.Configuration">
38-
<HintPath>..\packages\CSF.Configuration.1.1.0\lib\net45\CSF.Configuration.dll</HintPath>
48+
<HintPath>..\packages\CSF.Configuration.1.1.2\lib\net45\CSF.Configuration.dll</HintPath>
3949
</Reference>
4050
<Reference Include="CSF.Reflection">
41-
<HintPath>..\packages\CSF.Reflection.1.0.1\lib\net45\CSF.Reflection.dll</HintPath>
51+
<HintPath>..\packages\CSF.Reflection.1.0.3\lib\net45\CSF.Reflection.dll</HintPath>
4252
</Reference>
4353
<Reference Include="CSF.Utils">
44-
<HintPath>..\packages\CSF.Utils.6.0.0\lib\net45\CSF.Utils.dll</HintPath>
54+
<HintPath>..\packages\CSF.Utils.6.1.1\lib\net45\CSF.Utils.dll</HintPath>
4555
</Reference>
46-
<Reference Include="System.Xml" />
47-
<Reference Include="System.Xml.Linq" />
48-
<Reference Include="Microsoft.CSharp" />
49-
<Reference Include="System.Core" />
50-
<Reference Include="System.Dynamic" />
5156
<Reference Include="CSF.Zpt.Abstractions">
52-
<HintPath>..\packages\CSF.Zpt.Abstractions.1.0.5\lib\net45\CSF.Zpt.Abstractions.dll</HintPath>
57+
<HintPath>..\packages\CSF.Zpt.Abstractions.1.0.6\lib\net45\CSF.Zpt.Abstractions.dll</HintPath>
5358
</Reference>
5459
<Reference Include="CSF.Zpt">
55-
<HintPath>..\packages\CSF.Zpt.1.0.5\lib\net45\CSF.Zpt.dll</HintPath>
56-
</Reference>
57-
<Reference Include="HtmlAgilityPack">
58-
<HintPath>..\packages\HtmlAgilityPack.1.6.17\lib\Net45\HtmlAgilityPack.dll</HintPath>
59-
</Reference>
60-
<Reference Include="CSF.Zpt.DocumentProviders.HtmlHAP">
61-
<HintPath>..\packages\CSF.Zpt.DocumentProviders.HtmlHAP.1.0.5\lib\net45\CSF.Zpt.DocumentProviders.HtmlHAP.dll</HintPath>
60+
<HintPath>..\packages\CSF.Zpt.1.0.6\lib\net45\CSF.Zpt.dll</HintPath>
6261
</Reference>
6362
<Reference Include="CSF.Zpt.DocumentProviders.XmlLinq">
64-
<HintPath>..\packages\CSF.Zpt.DocumentProviders.XmlLinq.1.0.5\lib\net45\CSF.Zpt.DocumentProviders.XmlLinq.dll</HintPath>
63+
<HintPath>..\packages\CSF.Zpt.DocumentProviders.XmlLinq.1.0.6\lib\net45\CSF.Zpt.DocumentProviders.XmlLinq.dll</HintPath>
6564
</Reference>
6665
<Reference Include="CSF.Zpt.ExpressionEvaluators.CSharpExpressions">
67-
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.CSharpExpressions.1.0.5\lib\net45\CSF.Zpt.ExpressionEvaluators.CSharpExpressions.dll</HintPath>
66+
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.CSharpExpressions.1.0.6\lib\net45\CSF.Zpt.ExpressionEvaluators.CSharpExpressions.dll</HintPath>
6867
</Reference>
6968
<Reference Include="CSF.Zpt.ExpressionEvaluators.CSharpFramework">
70-
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.CSharpExpressions.1.0.5\lib\net45\CSF.Zpt.ExpressionEvaluators.CSharpFramework.dll</HintPath>
71-
</Reference>
72-
<Reference Include="CSF.Zpt.ExpressionEvaluators.LoadExpressions">
73-
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.LoadExpressions.1.0.5\lib\net45\CSF.Zpt.ExpressionEvaluators.LoadExpressions.dll</HintPath>
69+
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.CSharpExpressions.1.0.6\lib\net45\CSF.Zpt.ExpressionEvaluators.CSharpFramework.dll</HintPath>
7470
</Reference>
7571
<Reference Include="CSF.Zpt.ExpressionEvaluators.NotExpressions">
76-
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.NotExpressions.1.0.5\lib\net45\CSF.Zpt.ExpressionEvaluators.NotExpressions.dll</HintPath>
72+
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.NotExpressions.1.0.6\lib\net45\CSF.Zpt.ExpressionEvaluators.NotExpressions.dll</HintPath>
7773
</Reference>
7874
<Reference Include="CSF.Zpt.ExpressionEvaluators.PathExpressions">
79-
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.PathExpressions.1.0.5\lib\net45\CSF.Zpt.ExpressionEvaluators.PathExpressions.dll</HintPath>
75+
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.PathExpressions.1.0.6\lib\net45\CSF.Zpt.ExpressionEvaluators.PathExpressions.dll</HintPath>
8076
</Reference>
8177
<Reference Include="CSF.Zpt.ExpressionEvaluators.StringExpressions">
82-
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.StringExpressions.1.0.5\lib\net45\CSF.Zpt.ExpressionEvaluators.StringExpressions.dll</HintPath>
78+
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.StringExpressions.1.0.6\lib\net45\CSF.Zpt.ExpressionEvaluators.StringExpressions.dll</HintPath>
79+
</Reference>
80+
<Reference Include="CSF.Zpt.DocumentProviders.HtmlHAP">
81+
<HintPath>..\packages\CSF.Zpt.DocumentProviders.HtmlHAP.1.0.6\lib\net45\CSF.Zpt.DocumentProviders.HtmlHAP.dll</HintPath>
82+
</Reference>
83+
<Reference Include="CSF.Zpt.ExpressionEvaluators.LoadExpressions">
84+
<HintPath>..\packages\CSF.Zpt.ExpressionEvaluators.LoadExpressions.1.0.6\lib\net45\CSF.Zpt.ExpressionEvaluators.LoadExpressions.dll</HintPath>
8385
</Reference>
8486
</ItemGroup>
8587
<ItemGroup>
@@ -90,6 +92,11 @@
9092
<Compile Include="StreamSourceInfo.cs" />
9193
<Compile Include="Views\ResourceBundler.cs" />
9294
<Compile Include="HardCodedZptSharpConfigurationProvider.cs" />
95+
<Compile Include="Models\ReportModel.cs" />
96+
<Compile Include="Models\ScenarioModel.cs" />
97+
<Compile Include="Models\FeatureModel.cs" />
98+
<Compile Include="Models\ReportableModel.cs" />
99+
<Compile Include="Models\ReportConstants.cs" />
93100
</ItemGroup>
94101
<ItemGroup>
95102
<None Include="packages.config" />
@@ -100,6 +107,10 @@
100107
<Project>{18010B4E-22A7-4462-B057-7199B3386D48}</Project>
101108
<Name>CSF.Screenplay.Reporting</Name>
102109
</ProjectReference>
110+
<ProjectReference Include="..\CSF.Screenplay\CSF.Screenplay.csproj">
111+
<Project>{46E6DEAA-E6D5-4EE6-A552-17376BEA80DC}</Project>
112+
<Name>CSF.Screenplay</Name>
113+
</ProjectReference>
103114
</ItemGroup>
104115
<ItemGroup>
105116
<Folder Include="Views\" />

CSF.Screenplay.Reporting.Html/CSF.Screenplay.Reporting.Html.nuspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package>
33
<metadata>
44
<id>CSF.Screenplay.Reporting.Html</id>
5-
<version>0.12.0-beta</version>
5+
<version>0.13.0-beta</version>
66
<title>CSF.Screenplay.Reporting.Html</title>
77
<authors>CSF Software Ltd</authors>
88
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
@@ -11,10 +11,10 @@
1111
<description>Extension to Screenplay reporting which creates preety HTML from test runs, including filtering functionality.</description>
1212
<copyright>Copyright 2017</copyright>
1313
<dependencies>
14-
<dependency id="Zpt-Sharp-API" version="[1.0.5,2.0.0)" />
15-
<dependency id="CSF.Zpt.ExpressionEvaluators.LoadExpressions" version="[1.0.5,2.0.0)" />
16-
<dependency id="CSF.Screenplay" version="0.12.0-beta" />
17-
<dependency id="CSF.Screenplay.Reporting" version="0.12.0-beta" />
14+
<dependency id="Zpt-Sharp-API" version="[1.0.6,2.0.0)" />
15+
<dependency id="CSF.Zpt.ExpressionEvaluators.LoadExpressions" version="[1.0.6,2.0.0)" />
16+
<dependency id="CSF.Screenplay" version="0.13.0-beta" />
17+
<dependency id="CSF.Screenplay.Reporting" version="0.13.0-beta" />
1818
</dependencies>
1919
</metadata>
2020
<files>
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
//
2+
// FeatureModel.cs
3+
//
4+
// Author:
5+
// Craig Fowler <craig@csf-dev.com>
6+
//
7+
// Copyright (c) 2018 Craig Fowler
8+
//
9+
// Permission is hereby granted, free of charge, to any person obtaining a copy
10+
// of this software and associated documentation files (the "Software"), to deal
11+
// in the Software without restriction, including without limitation the rights
12+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
// copies of the Software, and to permit persons to whom the Software is
14+
// furnished to do so, subject to the following conditions:
15+
//
16+
// The above copyright notice and this permission notice shall be included in
17+
// all copies or substantial portions of the Software.
18+
//
19+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
// THE SOFTWARE.
26+
using System;
27+
using System.Collections.Generic;
28+
using System.Linq;
29+
30+
namespace CSF.Screenplay.Reporting.Models
31+
{
32+
/// <summary>
33+
/// Model for HTML report features (wraps a <see cref="Feature"/> instance).
34+
/// </summary>
35+
public class FeatureModel
36+
{
37+
readonly Feature feature;
38+
readonly IObjectFormattingService formattingService;
39+
40+
/// <summary>
41+
/// Gets the identity of this feature.
42+
/// </summary>
43+
public string Id => feature.Id;
44+
45+
/// <summary>
46+
/// Gets the human-readable friendly-name of this feature.
47+
/// </summary>
48+
public string FriendlyName => feature.FriendlyName;
49+
50+
/// <summary>
51+
/// Gets a collection of the scenarios in the current feature.
52+
/// </summary>
53+
public IReadOnlyCollection<ScenarioModel> Scenarios
54+
=> feature.Scenarios.Select(x => new ScenarioModel(x, formattingService)).ToArray();
55+
56+
/// <summary>
57+
/// Gets or sets a value indicating whether this <see cref="Feature"/> contains any scenarios which are themselves failures.
58+
/// </summary>
59+
/// <value><c>true</c> if this feature contains any failures; otherwise, <c>false</c>.</value>
60+
public bool HasFailures => feature.Scenarios.Any(x => x.IsFailure);
61+
62+
/// <summary>
63+
/// Gets or sets a value indicating whether every <see cref="Scenario"/> within this <see cref="Feature"/> is a success.
64+
/// </summary>
65+
/// <value><c>true</c> if the feature contains only successful scenarios; otherwise, <c>false</c>.</value>
66+
public bool IsSuccess => feature.Scenarios.All(x => x.IsSuccess);
67+
68+
/// <summary>
69+
/// Gets the HTML class attribute value indicating the outcome of a given feature.
70+
/// </summary>
71+
/// <returns>The feature outcome class.</returns>
72+
public string GetOutcomeClass()
73+
{
74+
if(feature == null) return String.Empty;
75+
var outcome = GetOutcomeClass(feature.IsSuccess, feature.HasFailures);
76+
return $"feature {outcome}";
77+
}
78+
79+
string GetOutcomeClass(bool success, bool failure)
80+
{
81+
if(success) return ReportConstants.SuccessClass;
82+
if(failure) return ReportConstants.FailureClass;
83+
return ReportConstants.InconclusiveClass;
84+
}
85+
86+
/// <summary>
87+
/// Initializes a new instance of the <see cref="T:CSF.Screenplay.Reporting.Models.FeatureModel"/> class.
88+
/// </summary>
89+
/// <param name="feature">Feature.</param>
90+
/// <param name="formattingService">Formatting service.</param>
91+
public FeatureModel(Feature feature, IObjectFormattingService formattingService)
92+
{
93+
if(formattingService == null)
94+
throw new ArgumentNullException(nameof(formattingService));
95+
if(feature == null)
96+
throw new ArgumentNullException(nameof(feature));
97+
98+
this.feature = feature;
99+
this.formattingService = formattingService;
100+
}
101+
}
102+
}

0 commit comments

Comments
 (0)