Skip to content

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.

License

Notifications You must be signed in to change notification settings

XPing365/xping365-sdk

Repository files navigation

NuGet Build Status codecov


XPing365 SDK

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License

About The Project

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.

(back to top)

Getting Started

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:

Installation using .NET CLI

  1. Open a command prompt or terminal window.

  2. Navigate to the directory where your project is located.

  3. Run the following command to install the XPing365 NuGet package:

    dotnet add package XPing365.Availability
    
  4. 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.

(back to top)

Usage

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.

(back to top)

Roadmap

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.

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE file for more information.

(back to top)

About

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.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages