Skip to content

Fix pipeline

Fix pipeline #281

GitHub Actions / Tests Reports failed Aug 6, 2024 in 0s

121 passed, 1 failed and 1 skipped

Tests failed

Report Passed Failed Skipped Time
TestResults/_fv-az1206-329_2024-08-06_02_00_26.trx 65✅ 13s
TestResults/_fv-az1206-329_2024-08-06_02_00_26[1].trx 51✅ 1⚪ 13s
TestResults/_fv-az1206-329_2024-08-06_02_00_27.trx 3✅ 5s
TestResults/_fv-az1206-329_2024-08-06_02_00_27[1].trx 2✅ 12s
TestResults/_fv-az1206-329_2024-08-06_02_00_31.trx 1❌ 3s

✅ TestResults/_fv-az1206-329_2024-08-06_02_00_26.trx

65 tests were completed in 13s with 65 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
SystemTestingTools.UnitTests.HelperTests 18✅ 56ms
SystemTestingTools.UnitTests.RecordingFormatterTests 1✅ 63ms
SystemTestingTools.UnitTests.RecordingManagerTests 3✅ 10s
SystemTestingTools.UnitTests.StringFormattingHelperTests 2✅ 34ms
SystemTestingTools.UnitTests.StubResponseFactoryHappyTests 7✅ 156ms
SystemTestingTools.UnitTests.StubResponseFactoryUnhappyTests 6✅ 86ms
SystemTestingTools.UnitTests.SystemTestingLoggerProviderTests 12✅ 2ms
SystemTestingTools.UnitTests.ValueObjectsTests 16✅ 54ms

✅ SystemTestingTools.UnitTests.HelperTests

✅ GetKnownContentType_Tests_Json(value: "application/json")
✅ GetKnownContentType_Tests_Json(value: "TEXT/json")
✅ GetKnownContentType_Tests_Xml(value: "application/xml")
✅ GetKnownContentType_Tests_Xml(value: "TEXT/xml")
✅ GetKnownContentType_tests(value: "")
✅ GetKnownContentType_tests(value: "gibberish")
✅ GetKnownContentType_tests(value: "null")
✅ GetKnownContentType_tests(value: "text/plain")
✅ ParseContentType_Happy(format: "application/html; charset=utf-16", encoding: "unicode", mediaType: "application/html")
✅ ParseContentType_Happy(format: "application/json; charset=utf-8", encoding: "utf-8", mediaType: "application/json")
✅ ParseContentType_Happy(format: "application/json", encoding: "utf-8", mediaType: "application/json")
✅ ParseContentType_Happy(format: "text/html; charset=GBK", encoding: "utf-8", mediaType: "text/html")
✅ ParseContentType_Happy(format: "text/html;charset=UTF-8", encoding: "utf-8", mediaType: "text/html")
✅ ParseContentType_Happy(format: "text/html", encoding: "utf-8", mediaType: "text/html")
✅ ParseContentType_Happy(format: "text/plain; charset=UTF-8", encoding: "utf-8", mediaType: "text/plain")
✅ ParseContentType_Unhappy(format: "  ")
✅ ParseContentType_Unhappy(format: "")
✅ ParseContentType_Unhappy(format: null)

✅ SystemTestingTools.UnitTests.RecordingFormatterTests

✅ Summarize_Maps_Fields_Properly

✅ SystemTestingTools.UnitTests.RecordingManagerTests

✅ GetRecordings_Including_Old_One_And_ResendAndUpdate_Works
✅ When_Files_Dont_Exist_Create_First_File
✅ When_FilesAlreadyExistInFolder_And_ValidRequestResponse_Then_CreateTextFileInRightFormat_And_CanLoadFile

✅ SystemTestingTools.UnitTests.StringFormattingHelperTests

✅ FormatJsonTests
✅ FormatXmlTests

✅ SystemTestingTools.UnitTests.StubResponseFactoryHappyTests

✅ FromBodyOnlyFile
✅ FromMemory
✅ Read200File
✅ Read200WithComments
✅ Read401File
✅ Read401File_WithoutBody
✅ Read424File

✅ SystemTestingTools.UnitTests.StubResponseFactoryUnhappyTests

✅ FileDoesntExist
✅ FileIsEmpty
✅ InvalidHttpStatus
✅ NoBody
✅ NoHttpStatusCode
✅ OnlyBody

✅ SystemTestingTools.UnitTests.SystemTestingLoggerProviderTests

✅ CanStoreLogsFromNamespaceWithIncludeAndExclude(fullNamespace: "MyFancyApp.NotSoInteresting", canLog: False)
✅ CanStoreLogsFromNamespaceWithIncludeAndExclude(fullNamespace: "MyFancyApp.Startup", canLog: True)
✅ CanStoreLogsFromNamespaceWithIncludeAndExclude(fullNamespace: "MyFancyApp.Whatever.Something", canLog: True)
✅ CanStoreLogsFromNamespaceWithIncludeAndNoExclude(fullNamespace: "MyFancyApp.SpecificArea1.Something", canLog: True)
✅ CanStoreLogsFromNamespaceWithIncludeAndNoExclude(fullNamespace: "MyFancyApp.SpecificArea2.Something", canLog: True)
✅ CanStoreLogsFromNamespaceWithIncludeAndNoExclude(fullNamespace: "MyFancyApp.Startup", canLog: False)
✅ CanStoreLogsFromNamespaceWithNoIncludeAndWithExclude(fullNamespace: "Microsoft.Owin.Whatever", canLog: True)
✅ CanStoreLogsFromNamespaceWithNoIncludeAndWithExclude(fullNamespace: "MyFancyApp.SpecificArea1.Something", canLog: False)
✅ CanStoreLogsFromNamespaceWithNoIncludeAndWithExclude(fullNamespace: "MyFancyApp.SpecificArea1", canLog: False)
✅ CanStoreLogsFromNamespaceWithNoIncludeAndWithExclude(fullNamespace: "MyFancyApp.SpecificArea2.Something", canLog: False)
✅ CanStoreLogsFromNamespaceWithNoIncludeAndWithExclude(fullNamespace: "MyFancyApp.Startup", canLog: True)
✅ CanStoreLogsFromNamespaceWithNoIncludeOrExclude

✅ SystemTestingTools.UnitTests.ValueObjectsTests

✅ FileFullPath_Empty_Unhappy
✅ FileFullPath_FolderDoesntExist_Unhappy
✅ FileFullPath_Happy
✅ FileName_Happy
✅ FileName_Unhappy(fileName: " ", expectedMessage: null)
✅ FileName_Unhappy(fileName: "/Success", expectedMessage: "/Success contains invalid chars")
✅ FileName_Unhappy(fileName: "Success.txt", expectedMessage: "Success.txt should not contain extension")
✅ FolderAbsolutePath_Empty_Unhappy
✅ FolderAbsolutePath_Folder_DoesntExist
✅ FolderAbsolutePath_Happy
✅ FolderRelativePath_Happy
✅ FolderRelativePath_Unhappy(folder: " ", expectedMessage: null)
✅ FolderRelativePath_Unhappy(folder: "some/invalid|path\0", expectedMessage: "Invalid chars for folder name found: some/invalid|"...)
✅ RelativeUri_Happy
✅ RelativeUri_Unhappy(path: " ", expectedMessage: null)
✅ RelativeUri_Unhappy(path: "Stubs|here", expectedMessage: "Not a valid Uri path: Stubs|here")

✅ TestResults/_fv-az1206-329_2024-08-06_02_00_26[1].trx

52 tests were completed in 13s with 51 passed, 0 failed and 1 skipped.

Test suite Passed Failed Skipped Time
IsolatedTests.ComponentTestings.CarHappyTests 1✅ 37ms
IsolatedTests.ComponentTestings.GetMovieHappyTests 7✅ 1⚪ 97ms
IsolatedTests.ComponentTestings.GetMovieUnhappyTests 12✅ 8s
IsolatedTests.ComponentTestings.GetUserHappyTests 1✅ 14ms
IsolatedTests.ComponentTestings.MathHappyTests 1✅ 204ms
IsolatedTests.ComponentTestings.PostHappyTests 1✅ 77ms
IsolatedTests.UnitTests.CacheWrapperTests 2✅ 56ms
MovieProject.IsolatedTests.ComponentTesting.SearchUserHappyTests 1✅ 379ms
MovieProject.IsolatedTests.UnitTests.StringExtensionsTests 25✅ 42ms

✅ IsolatedTests.ComponentTestings.CarHappyTests

✅ When_Listing_Adding_ListingAgain_Success

✅ IsolatedTests.ComponentTestings.GetMovieHappyTests

✅ When_UserAddsMovieToResearchQueue_Then_Success
✅ When_UserAsksForMovie_30times_WithSameStub_Works
✅ When_UserAsksForMovieThatDoesntExist_Then_Return400Status
✅ When_UserAsksForMovieWithMostFields_Then_ReturnMovieProperly
⚪ When_UserAsksForMovieWithMostFields_Then_ReturnMovieProperly_Incomplete
✅ When_UserAsksForMovieWithMostFields_With_ResponseBodyOnly_Then_ReturnMovieProperly
✅ When_UserAsksForMovieWithSomeInvalidValues_Then_ReturnMovieProperly
✅ When_UserAsksForMoviFewFields_Then_ReturnMovieProperly

✅ IsolatedTests.ComponentTestings.GetMovieUnhappyTests

✅ When_CallThrowsException_Then_LogError_And_Return_Downstream_Error
✅ When_DownstreamSystemReturnsError_Then_LogError_And_ReturnDefaultErrorMessage(httpStatus: InternalServerError, fileName: "Fake_Responses/Unhappy/500_InternalServerError.txt", logContent: "<title>Internal Server Error</title>")
✅ When_DownstreamSystemReturnsError_Then_LogError_And_ReturnDefaultErrorMessage(httpStatus: OK, fileName: "Real_Responses/Unhappy/200_SomethingWentWrong_When"..., logContent: "Something went wrong")
✅ When_DownstreamSystemReturnsError_Then_LogError_And_ReturnDefaultErrorMessage(httpStatus: RequestTimeout, fileName: "Fake_Responses/Unhappy/408_Timeout.txt", logContent: " ")
✅ When_DownstreamSystemReturnsError_Then_LogError_And_ReturnDefaultErrorMessage(httpStatus: ServiceUnavailable, fileName: "Fake_Responses/Unhappy/503_ServiceUnailable.txt", logContent: "The service is temporarily unavailable")
✅ When_DownstreamSystemReturnsError_Then_LogError_And_ReturnDefaultErrorMessage(httpStatus: TooManyRequests, fileName: "Fake_Responses/Unhappy/429_TooManyRequests_Properl"..., logContent: "Too many requests with your api key")
✅ When_DownstreamSystemReturnsError_Then_LogError_And_ReturnDefaultErrorMessage(httpStatus: TooManyRequests, fileName: "Fake_Responses/Unhappy/429_TooManyRequests_RawForm"..., logContent: "Too many requests with your api key")
✅ When_DownstreamSystemReturnsError_Then_LogError_And_ReturnDefaultErrorMessage(httpStatus: Unauthorized, fileName: "Real_Responses/Unhappy/401_InvalidKey.txt", logContent: "Invalid API key!")
✅ When_DownstreamSystemReturnsError_Then_LogError_And_ReturnDefaultErrorMessage(httpStatus: Unauthorized, fileName: "Real_Responses/Unhappy/401_LimitReached.txt", logContent: "Request limit reached")
✅ When_DownstreamSystemReturnsInvalidJson_Then_LogError_And_ReturnDefaultErrorMessage
✅ When_UserDoesntSendNecessaryInput_Then_LogWarning_And_ReturnBadRequestMessage(route: "movie/    a", correctMessage: "name has too few characters", culprit: "a")
✅ When_UserDoesntSendNecessaryInput_Then_LogWarning_And_ReturnBadRequestMessage(route: "movie/1    ", correctMessage: "name has too few characters", culprit: "1")

✅ IsolatedTests.ComponentTestings.GetUserHappyTests

✅ When_UserAsksForUserList_Then_ReturnListProperly

✅ IsolatedTests.ComponentTestings.MathHappyTests

✅ When_CallingManyWcfMethods_Then_CanPerformMath_Successfully

✅ IsolatedTests.ComponentTestings.PostHappyTests

✅ When_Creating_Post_Success

✅ IsolatedTests.UnitTests.CacheWrapperTests

✅ GetOrSetFromCache_Caches_Properly
✅ GetOrSetFromCache_Doesnt_Cache_When_Required

✅ MovieProject.IsolatedTests.ComponentTesting.SearchUserHappyTests

✅ When_UserSearchesWithValidParameters_Then_ReturnListProperly

✅ MovieProject.IsolatedTests.UnitTests.StringExtensionsTests

✅ CanCleanNA(originalString: "    ", expectedResult: "")
✅ CanCleanNA(originalString: "   some title  ", expectedResult: "some title")
✅ CanCleanNA(originalString: "", expectedResult: "")
✅ CanCleanNA(originalString: "N/A", expectedResult: "")
✅ CanCleanYear(yearString: "    ", expectedResult: "Unknown")
✅ CanCleanYear(yearString: "   2019   ", expectedResult: "2019")
✅ CanCleanYear(yearString: "", expectedResult: "Unknown")
✅ CanCleanYear(yearString: "0", expectedResult: "Unknown")
✅ CanCleanYear(yearString: "1887", expectedResult: "Unknown")
✅ CanCleanYear(yearString: "1888", expectedResult: "1888")
✅ CanCleanYear(yearString: "2019", expectedResult: "2019")
✅ CanCleanYear(yearString: "3019", expectedResult: "Unknown")
✅ CanCleanYear(yearString: "gibberish", expectedResult: "Unknown")
✅ CanCleanYear(yearString: null, expectedResult: "Unknown")
✅ CanFormatDuration(durationInMinutes: "    ", durationFormatted: "Unknown")
✅ CanFormatDuration(durationInMinutes: " ", durationFormatted: "Unknown")
✅ CanFormatDuration(durationInMinutes: "-1 min", durationFormatted: "Unknown")
✅ CanFormatDuration(durationInMinutes: "0 min", durationFormatted: "Unknown")
✅ CanFormatDuration(durationInMinutes: "1 min", durationFormatted: "1 min")
✅ CanFormatDuration(durationInMinutes: "136 min", durationFormatted: "2.3h")
✅ CanFormatDuration(durationInMinutes: "43,200 min", durationFormatted: "720h")
✅ CanFormatDuration(durationInMinutes: "59 min", durationFormatted: "59 min")
✅ CanFormatDuration(durationInMinutes: "60 gibberish", durationFormatted: "Unknown")
✅ CanFormatDuration(durationInMinutes: "60 min", durationFormatted: "1h")
✅ CanFormatDuration(durationInMinutes: null, durationFormatted: "Unknown")

✅ TestResults/_fv-az1206-329_2024-08-06_02_00_27.trx

3 tests were completed in 5s with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
MovieProject.InterceptionTests.GetMovieTests 3✅ 653ms

✅ MovieProject.InterceptionTests.GetMovieTests

✅ When_SendingHeaderWithStubInstructions_WebSiteObeys
✅ When_UserAsksForMovie_ButWrongUrl_AndNoRecordingFound_Then_ReturnFallback
✅ When_UserAsksForMovie_ButWrongUrl_Then_FindResponseInPreApproved

✅ TestResults/_fv-az1206-329_2024-08-06_02_00_27[1].trx

2 tests were completed in 12s with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
MovieProject.ContractTests.MovieDatabaseProxyTests 2✅ 9s

✅ MovieProject.ContractTests.MovieDatabaseProxyTests

✅ CanRetrieveMovie_TheMatrix
✅ CanRetrieveTvSeries_TheBigBangTheory

❌ TestResults/_fv-az1206-329_2024-08-06_02_00_31.trx

1 tests were completed in 3s with 0 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
MovieProject.InterceptionTests.GetMovieTests 1❌ 1s

❌ MovieProject.InterceptionTests.GetMovieTests

❌ When_UserAsksForMovie_WithNoStubs_Then_RetrieveFromRealServer
	Expected httpResponse.StatusCode to be empty, but found {Error: GET http://www.omdbapi.com/?apikey=863d6589&type=movie&t=inception received exception [The operation was canceled.]}.
	Expected string to be <null>, but found "Recording [omdb/pre-approved/happy/last_fallback] reason GET http://www.omdbapi.com/?apikey=863d6589&type=movie&t=inception received exception [The operation was canceled.] and could not find better match".
	Expected movie.Name to be "tt1375666", but "tt0123456" differs near "012" (index 2).
	Expected movie.Name to be "Inception" with a length of 9, but "Fake Movie Last Fallback" has a length of 24, differs near "Fak" (index 0).
	

Annotations

Check failure on line 47 in Examples/MovieProject/MovieProject.Tests/MovieProject.InterceptionHappyTests/GetMovieTests.cs

See this annotation in the file changed.

@github-actions github-actions / Tests Reports

MovieProject.InterceptionTests.GetMovieTests ► When_UserAsksForMovie_WithNoStubs_Then_RetrieveFromRealServer

Failed test found in:
  TestResults/_fv-az1206-329_2024-08-06_02_00_31.trx
Error:
  Expected httpResponse.StatusCode to be empty, but found {Error: GET http://www.omdbapi.com/?apikey=863d6589&type=movie&t=inception received exception [The operation was canceled.]}.
  Expected string to be <null>, but found "Recording [omdb/pre-approved/happy/last_fallback] reason GET http://www.omdbapi.com/?apikey=863d6589&type=movie&t=inception received exception [The operation was canceled.] and could not find better match".
  Expected movie.Name to be "tt1375666", but "tt0123456" differs near "012" (index 2).
  Expected movie.Name to be "Inception" with a length of 9, but "Fake Movie Last Fallback" has a length of 24, differs near "Fak" (index 0).
  
Raw output
Expected httpResponse.StatusCode to be empty, but found {Error: GET http://www.omdbapi.com/?apikey=863d6589&type=movie&t=inception received exception [The operation was canceled.]}.
Expected string to be <null>, but found "Recording [omdb/pre-approved/happy/last_fallback] reason GET http://www.omdbapi.com/?apikey=863d6589&type=movie&t=inception received exception [The operation was canceled.] and could not find better match".
Expected movie.Name to be "tt1375666", but "tt0123456" differs near "012" (index 2).
Expected movie.Name to be "Inception" with a length of 9, but "Fake Movie Last Fallback" has a length of 24, differs near "Fak" (index 0).

   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context)
   at MovieProject.InterceptionTests.GetMovieTests.When_UserAsksForMovie_WithNoStubs_Then_RetrieveFromRealServer() in /home/runner/work/SystemTestingTools/SystemTestingTools/Examples/MovieProject/MovieProject.Tests/MovieProject.InterceptionHappyTests/GetMovieTests.cs:line 47
--- End of stack trace from previous location where exception was thrown ---