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

docs: publishes v1.0 feature docs #143

Merged
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
6 changes: 0 additions & 6 deletions docs/preview/01-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ The Arcus Testing library provides test-friendly capabilities to kick-start your
## Guides
* [Migrate from Testing Framework to Arcus.Testing v1.0](03-Guidance/migrate-from-testing-framework-to-arcus-testing-v1.0.md)

# Installation
The Arcus.Testing library can be installed via NuGet, for instance:

```shell
PM > Install-Package Arcus.Testing.Logging
```
# License

This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Core testing functionality
# Test core infrastructure

The `Arcus.Testing.Core` package provides general testing functionality that is independent of technology, SUT (system-under-test) testing framework.
The `Arcus.Testing.Core` package provides general testing infrastructure that is independent of technology, SUT (system-under-test) or testing framework.
The features provided in this package are very often used and/or required for a functional integration/system test suite.

## Installation

The following functionality is available when installing this package:
The following infrastructure is available when installing this package:

```shell
PM> Install-Package -Name Arcus.Testing.Core
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Test assertion
# Test assertions
The `Arcus.Testing.Assert` library is a highly reusable and independent library that contains dev-friendly test assertions on different types of output (XML, JSON...). The purpose of the library is to write readable and test-friendly assertions that show quickly what went wrong with the (XML, JSON...) output of a certain piece of functionality.

## Installation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Logging
# Test framework logging
This page describes functionality related to logging in tests.

## xUnit test logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PM> Install-Package -Name Arcus.Testing.Messaging.Pumps.EventHubs
## Test Azure EventHubs message pump

As an addition on the [Arcus Azure EventHubs message pump](https://messaging.arcus-azure.net/Features/message-handling/event-hubs), we have provided a test version of the message pump to verify your custom Azure EventHubs message handler implementations.
These hander implementations can be tested separately, and could be tested by interacting with the message router directly, but simulating messages like it would be from Azure EventHubs itself is a bit trickier.
These handler implementations can be tested separately, and could be tested by interacting with the message router directly, but simulating messages like it would be from Azure EventHubs itself is a bit trickier.
This test message pump functionality allows you to verify certain cases without the need of an actual Azure resource.

We provide an extension that acts as an Azure EventHubs message pump and lets you decide how messages should be produced.
Expand All @@ -36,7 +36,7 @@ public class SensorReadingAzureEventHubsMessageHandler : IAzureEventHubsMessageH
MessageCorrelationInfo correlationInfo,
CancellationToken cancellationToken)
{
// Proces sensor reading...
// Process sensor reading...
}
}

Expand All @@ -48,7 +48,7 @@ public class SensorTelemetryAzureEventHubsMessageHandler : IAzureEventHubsMessag
MessageCorrelationInfo correlationInfo,
CancellationToken cancellationToken)
{
// Proces sensor telemetry...
// Process sensor telemetry...
}
}
```
Expand Down Expand Up @@ -111,7 +111,7 @@ public class MessageHandlingTests
Note that in this example, we use `Assert.True(handler.IsProcessed)` to determine if the `SensorReading` message was correctly processed. In your application, you may want to inject your message handlers with test versions of dependencies and determine via those dependencies if the correct message handler was called.
You can use one of the `.WithEventHubsMessageHandler<,>(...)` extensions to pass in your instance of the message handler so you can use it later in the test assertion, like it is shown in the example.

> 💡 Note that the example uses `logging.AddXunitTestLogging`. This is available in the `Arcus.Testing.Logging` package. See [this page on logging](./logging.md) for more information.
> 💡 Note that the example uses `logging.AddXunitTestLogging`. This is available in the `Arcus.Testing.Logging.Xunit` package. See [this page on logging](../03-logging.md) for more information.

## Message producer configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PM> Install-Package -Name Arcus.Testing.Messaging.Pumps.ServiceBus
## Test Azure Service Bus message pump

As an addition on the [Arcus Azure Service Bus message pump](https://messaging.arcus-azure.net/Features/message-handling/service-bus), we have provided a test version of the message pump to verify your custom Azure Service Bus message handler implementations.
These hander implementations can be tested separately, and could be tested by interacting with the message router directly, but simulating messages like it would be from Azure Service Bus itself is a bit trickier.
These handler implementations can be tested separately, and could be tested by interacting with the message router directly, but simulating messages like it would be from Azure Service Bus itself is a bit trickier.
This test message pump functionality allows you to verify certain cases without the need of an actual Azure resource.

We provide an extension that acts as an Azure Service Bus message pump and lets you decide how messages should be produced.
Expand All @@ -36,7 +36,7 @@ public class OrderAzureServiceBusMessageHandler : IAzureServiceBusMessageHandler
MessageCorrelationInfo correlationInfo,
CancellationToken cancellationToken)
{
// Proces order...
// Process order...
}
}

Expand All @@ -48,7 +48,7 @@ public class ShipmentAzureServiceBusMessageHandler : IAzureServiceBusMessageHand
MessageCorrelationInfo correlationInfo,
CancellationToken cancellationToken)
{
// Proces shipment...
// Process shipment...
}
}
```
Expand Down Expand Up @@ -111,7 +111,7 @@ public class MessageHandlingTests
Note that in this example, we use `Assert.True(handler.IsProcessed)` to determine if the `Order` message was correctly processed. In your application, you may want to inject your message handlers with test versions of dependencies and determine via those dependencies if the correct message handler was called.
You can use one of the `.WithServiceBusMessageHandler<,>(...)` extensions to pass in your instance of the message handler so you can use it later in the test assertion, like it is shown in the example.

> 💡 Note that the example uses `logging.AddXunitTestLogging`. This is available in the `Arcus.Testing.Logging` package. See [this page on logging](./logging.md) for more information.
> 💡 Note that the example uses `logging.AddXunitTestLogging`. This is available in the `Arcus.Testing.Logging.Xunit` package. See [this page on logging](../03-logging.md) for more information.

## Message producer configuration

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
title: Security
layout: default
---

# Security
# In-memory secret provider

## Installation

Expand All @@ -13,7 +8,7 @@ The following functionality is available when installing this package:
PM> Install-Package -Name Arcus.Testing.Security.Providers.InMemory
```

## In-memory secret provider
## Usage

As an addition to the [Arcus Security](https://github.com/arcus-azure/arcus.security) package, we have added an in-memory `ISecretProvider` implementation.
This secret provider is created so you can test you secret store configuration with non-secret values in a easy manner, without implementing your own `ISecretProvider`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Start by installing this library:
PM > Install-Package -Name Arcus.Testing.Assert
```

🔗 See the [feature documentation](../02-Features/assertion.md) for more info on the supported assertions.
🔗 See the [feature documentation](../02-Features/02-assertion.md) for more info on the supported assertions.

🔗 See the [code samples](https://github.com/arcus-azure/arcus.testing/tree/main/samples) for fully-implemented examples on before/after with the Testing Framework.

Expand Down Expand Up @@ -54,7 +54,7 @@ Any nodes that should be ignored can be configured by passing additional options
+ });
```

🔗 See the [feature documentation](../02-Features/assertion.md) for more info on the `AssertXml`.
🔗 See the [feature documentation](../02-Features/02-assertion.md) for more info on the `AssertXml`.

### JSON
You can use `AssertJson` like any other assertion method. Instead of returning a boolean and a message, it throws an exception with a detailed report in case of a difference.
Expand Down Expand Up @@ -87,7 +87,7 @@ Any nodes that should be ignored can be configured by passing additional options
+ });
```

🔗 See the [feature documentation](../02-Features/assertion.md) for more info on the `AssertJson` and the available options.
🔗 See the [feature documentation](../02-Features/02-assertion.md) for more info on the `AssertJson` and the available options.

### CSV
You can use `AssertCsv` like any other assertion method. Instead of returning a boolean and a message, it throws an exception with a detailed report in case of a difference. The Arcus variant also allows for raw CSV to be compared, without the need for you to create a dedicated DTO serialization model before the comparison can happen. It is advised to use your custom domain comparison if you need custom comparison of rows.
Expand Down Expand Up @@ -129,7 +129,7 @@ string actualCsv = ...;
+ });
```

🔗 See the [feature documentation](../02-Features/assertion.md) for more info on the `AssertCsv` and the available options.
🔗 See the [feature documentation](../02-Features/02-assertion.md) for more info on the `AssertCsv` and the available options.

### XSLT
Transforming XML-XML to XML-JSON now also happens in a test asserted manner. It does not use the file name anymore and a 'convention by configuration' file structure, but needs the actual contents. You can use the test-friendly `ResourceDirectory` in the `Arcus.Testing.Core` package to load the files.
Expand Down Expand Up @@ -159,7 +159,7 @@ Here's how XML-XML now works:

> 💡You can use the test-friendly `AssertXml/Xslt.Load` functionality to load raw contents to their respectful XSLT/XML document. Upon failure, a load exception with a detailed description will be reported to the tester.

> 💡 You can use the test-friendly [`ResourceDirectory`](../02-Features/core.md) functionality in the `Arcus.Testing.Core` package to load raw file contents. Upon failure, a not-found exception with a detailed description will be reported to the tester.
> 💡 You can use the test-friendly [`ResourceDirectory`](../02-Features/01-core.md) functionality in the `Arcus.Testing.Core` package to load raw file contents. Upon failure, a not-found exception with a detailed description will be reported to the tester.

Here's how XML-JSON now works:

Expand All @@ -184,7 +184,7 @@ Here's how XML-JSON now works:

> 💡You can use the test-friendly `AssertXml/Json/Xslt.Load` functionality to load raw contents to their respectful XSLT/XML/JSON document. Upon failure, a load exception with a detailed description will be reported to the tester.

> 💡 You can use the test-friendly [`ResourceDirectory`](../02-Features/core.md) functionality in the `Arcus.Testing.Core` package to load raw file contents. Upon failure, a not-found exception with a detailed description will be reported to the tester.
> 💡 You can use the test-friendly [`ResourceDirectory`](../02-Features/01-core.md) functionality in the `Arcus.Testing.Core` package to load raw file contents. Upon failure, a not-found exception with a detailed description will be reported to the tester.

Here's how XML-CSV now works:

Expand All @@ -209,10 +209,10 @@ Here's how XML-CSV now works:

> 💡You can use the test-friendly `AssertXml/Csv/Xslt.Load` functionality to load raw contents to their respectful XSLT/XML/CSV document. Upon failure, a load exception with a detailed description will be reported to the tester.

> 💡 You can use the test-friendly [`ResourceDirectory`](../02-Features/core.md) functionality in the `Arcus.Testing.Core` package to load raw file contents. Upon failure, a not-found exception with a detailed description will be reported to the tester.
> 💡 You can use the test-friendly [`ResourceDirectory`](../02-Features/01-core.md) functionality in the `Arcus.Testing.Core` package to load raw file contents. Upon failure, a not-found exception with a detailed description will be reported to the tester.


🔗 See the [feature documentation](../02-Features/assertion.md) for more info on the `AssertXslt`.
🔗 See the [feature documentation](../02-Features/02-assertion.md) for more info on the `AssertXslt`.

#### Sequential transformations
The original Testing Framework had a `TestXsltSequential` exposed functionality to run multiple XSLT transformation in sequence (output of one transformation becomes input of another). This was using separate input types for file names. Since this is made explicit in the `Arcus.Testing` packages, you can load those files yourself using the `ResourceDirectory` type and do the sequential transformation in a more explicit manner:
Expand Down
19 changes: 19 additions & 0 deletions docs/versioned_docs/version-v1.0.0/01-index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Arcus - Testing"
layout: default
slug: /
sidebar_label: Welcome
sidebar_position: 1
---

# Introduction
The Arcus Testing library provides test-friendly capabilities to kick-start your test suite. Ranges from tech-independent infrastructure code to fully production-ready assertions. The library contains also Azure-related test fixtures to make interactions during testing more maintainable, testable and fun to write.

## Guides
* [Migrate from Testing Framework to Arcus.Testing v1.0](03-Guidance/migrate-from-testing-framework-to-arcus-testing-v1.0.md)

# License

This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application.

_[Full license here](https://github.com/arcus-azure/arcus.testing/blob/master/LICENSE)_
Loading
Loading