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

Rewrite nunit agent to use new reporting APIs #8

Merged
merged 7 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion App.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="console" xsi:type="Console"/>
<target name="zebrunner" xsi:type="Zebrunner" layout="${logger} ${level}: ${message}"/>
<target name="file" xsi:type="File" layout="${date} ${logger} ${level}: ${message}" fileName="${var:test_log_dir}\test.log"/>
</targets>

<rules>
<logger name="*" minlevel="Info" writeTo="console"/>
<logger name="*" minlevel="Debug" writeTo="zebrunner"/>
<logger name="*" minlevel="Trace" writeTo="file"/>
</rules>
</nlog>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
14 changes: 14 additions & 0 deletions Client/Requests/ArtifactReference.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace ZafiraIntegration.Client.Requests
{
internal class ArtifactReference
{
public string Name { get; }
public string Value { get; }

public ArtifactReference(string name, string value)
{
Name = name;
Value = value;
}
}
}
11 changes: 11 additions & 0 deletions Client/Requests/FinishTestRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace ZafiraIntegration.Client.Requests
{
internal class FinishTestRequest
{
public DateTime EndedAt { get; set; }
public string Result { get; set; }
public string Reason { get; set; }
}
}
9 changes: 9 additions & 0 deletions Client/Requests/FinishTestRunRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace ZafiraIntegration.Client.Requests
{
internal class FinishTestRunRequest
{
public DateTime EndedAt { get; set; }
}
}
14 changes: 14 additions & 0 deletions Client/Requests/Label.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace ZafiraIntegration.Client.Requests
{
internal class Label
{
public string Key { get; }
public string Value { get; }

internal Label(string key, string value)
{
Key = key;
Value = value;
}
}
}
10 changes: 10 additions & 0 deletions Client/Requests/Log.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace ZafiraIntegration.Client.Requests
{
internal class Log
{
public long TestId { get; set; }
public string Message { get; set; }
public string Level { get; set; }
public long Timestamp { get; set; }
}
}
7 changes: 7 additions & 0 deletions Client/Requests/RefreshAccessTokenRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace ZafiraIntegration.Client.Requests
{
internal class RefreshAccessTokenRequest
{
public string RefreshToken { get; set; }
}
}
17 changes: 17 additions & 0 deletions Client/Requests/StartTestRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;

namespace ZafiraIntegration.Client.Requests
{
internal class StartTestRequest
{
public string Name { get; set; }
public string CorrelationData { get; set; }
public string ClassName { get; set; }
public string MethodName { get; set; }
public DateTime StartedAt { get; set; }
public string Maintainer { get; set; }
public string TestCase { get; set; }
public List<Label> Labels { get; set; }
}
}
28 changes: 28 additions & 0 deletions Client/Requests/StartTestRunRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;

namespace ZafiraIntegration.Client.Requests
{
internal class StartTestRunRequest
{
public string Uuid { get; set; }
public string Name { get; set; }
public DateTime StartedAt { get; set; }
public string Framework { get; set; }
public ConfigDto Config { get; set; }
public JenkinsContextDto JenkinsContext { get; set; }

internal class ConfigDto
{
public string Environment { get; set; }
public string Build { get; set; }
}

internal class JenkinsContextDto
{
public string JobUrl { get; set; }
public string JobNumber { get; set; }
public string ParentJobUrl { get; set; }
public string ParentJobNumber { get; set; }
}
}
}
7 changes: 7 additions & 0 deletions Client/Responses/RefreshAccessTokenResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace ZafiraIntegration.Client.Responses
{
internal class RefreshAccessTokenResponse
{
public string AuthToken { get; set; }
}
}
19 changes: 19 additions & 0 deletions Client/Responses/SaveTestResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

namespace ZafiraIntegration.Client.Responses
{
internal class SaveTestResponse
{
public long Id { get; set; }
public string Name { get; set; }
public string CorrelationData { get; set; }
public string ClassName { get; set; }
public string MethodName { get; set; }
public DateTime StartedAt { get; set; }
public DateTime EndedAt { get; set; }
public string Maintainer { get; set; }
public string TestCase { get; set; }
public string Result { get; set; }
public string Reason { get; set; }
}
}
22 changes: 22 additions & 0 deletions Client/Responses/SaveTestRunResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;

namespace ZafiraIntegration.Client.Responses
{
internal class SaveTestRunResponse
{
public long Id { get; set; }
public string Uuid { get; set; }
public string Name { get; set; }
public string Status { get; set; }
public DateTime StartedAt { get; set; }
public string EndedAt { get; set; }
public string Framework { get; set; }
public ConfigDto Config { get; set; }

internal class ConfigDto
{
public string Environment { get; set; }
public string Build { get; set; }
}
}
}
Loading