XPing365 SDK is a free and open-source .NET library written in C# to help automate Web Application or Web API testing.
Report Bug
·
Request Feature
Table of Contents
XPing365 SDK provides a set of tools to make it easy to write automated tests for Web Application and Web API, as well as troubleshoot issues that may arise during testing. The library provides a number of features to verify that the Web Application is functioning correctly, such as checking that the correct data is displayed on a page or that the correct error messages are displayed when an error occurs.
The library is called XPing365, which stands for eXternal Pings, and is used to verify the availability of a server and monitor its content.
You can find more information about the library, including documentation and examples, on the official website xping365.com.
The library is distributed as a NuGet packages, which can be installed using the .NET CLI command dotnet add package
. Here are the steps to get started:
-
Open a command prompt or terminal window.
-
Navigate to the directory where your project is located.
-
Run the following command to install the XPing365 NuGet package:
dotnet add package XPing365.Availability
-
Once the package is installed, you can start using the XPing365 library in your project.
using XPing365.Availability.DependencyInjection;
Host.CreateDefaultBuilder()
.ConfigureServices(services =>
{
.AddHttpClientFactory()
.AddTestAgent(agent =>
{
agent.UploadToken = "--- Your Upload Token ---";
agent.UseDnsLookup()
.UseIPAddressAccessibilityCheck()
.UseHttpClient()
.UseHttpValidation(response =>
{
response.EnsureSuccessStatusCode();
response.Header(HeaderNames.Server).HasValue("ServerName");
});
});
});
using XPing365.Availability
var testAgent = _serviceProvider.GetRequiredService<TestAgent>();
TestSession session = await testAgent.RunAsync(new Uri("www.demoblaze.com"));
You can also integrate it with your preferred testing framework, such as NUnit, as shown below:
[Test]
public async Task IndexPageHasCorrectTitle()
{
// Arrange
TestAgent.UseHtmlValidation(html =>
{
html.HasTitle("Listing - WebApp");
});
// Act
await using var session = await TestAgent.RunAsync(new Uri("http://localhost/"));
// Assert
Assert.That(session.IsValid, Is.True, session.Failures.FirstOrDefault()?.ErrorMessage);
}
That’s it! You’re now ready to start automating your web application tests and monitoring your server’s content using XPing365.
The samples
folder in this repository contains various examples of how to use XPing 365 for your testing needs. For a comprehensive guide on how to install, configure, and customize XPing 365, please refer to the documentation website available at xping365.github.io.
We use Milestones to communicate upcoming changes XPing365 SDK:
-
Working Set refers to the features that are currently being actively worked on. While not all of these features will be committed in the next release, they do reflect the top priorities of the maintainers for the upcoming period.
-
Backlog is a set of feature candidates for some future releases, but are not being actively worked on.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
file for more information.