diff --git a/LICENSE b/LICENSE index ca9fb45..97d854a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2022 Tibor BΓΆdecs +Copyright (c) 2022-2023 Binary Birds Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/makefile b/Makefile similarity index 51% rename from makefile rename to Makefile index 526d8f4..00749f2 100644 --- a/makefile +++ b/Makefile @@ -1,6 +1,8 @@ -install: +release: swift package update && swift build -c release - install .build/Release/testify-cli /usr/local/bin/testify + +install: release + install .build/Release/testify /usr/local/bin/testify uninstall: rm /usr/local/bin/testify diff --git a/Package.swift b/Package.swift index f3b03e3..b325b19 100644 --- a/Package.swift +++ b/Package.swift @@ -1,15 +1,37 @@ -// swift-tools-version:5.5 +// swift-tools-version:5.7 import PackageDescription let package = Package( - name: "Testify", + name: "testify", + platforms: [ + .macOS(.v10_15), + ], products: [ - .library(name: "Testify", targets: ["Testify"]), - .executable(name: "testify-cli", targets: ["testify-cli"]) + .executable(name: "testify", targets: ["testify"]), + .library(name: "TestifySDK", targets: ["TestifySDK"]) ], targets: [ - .executableTarget(name: "testify-cli", dependencies: ["Testify"], path: "./Sources/cli"), - .target(name: "Testify", dependencies: [], path: "./Sources/lib"), - .testTarget(name: "TestifyTests", dependencies: ["Testify"]), + .executableTarget( + name: "testify", + dependencies: [ + .target(name: "TestifySDK") + ] + ), + + // MARK: - targets + + .target( + name: "TestifySDK", + dependencies: [] + ), + + // MARK: - test targets + + .testTarget( + name: "TestifySDKTests", + dependencies: [ + .target(name: "TestifySDK"), + ] + ), ] ) diff --git a/README.md b/README.md index 2e8755e..543108f 100755 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ -# Testify (βœ…) +# Testify -Testify converts XCTest output into a proper structure (JSON), or it'll miserably fail. πŸ˜‰ +Testify converts XCTest output into a proper structure (JSON, JUNIT, MD), or it'll miserably fail. πŸ˜‰ -## Install Testify cli +## Install command line utility -You can use the cli to convert test results into JSON on the fly. - -You can use the cli to convert test results into JSON on the fly. +You can use the command line utility to convert test results into JSON, JUNIT and MD on the fly. ``` git clone https://github.com/BinaryBirds/Testify.git && cd Testify @@ -17,12 +15,18 @@ which testify ## Usage -In your projetct folder run `swift test 2>&1 | testify` or +In your project folder run: + +* for JSON format: `swift test | testify json` +* for JUNIT format: `swift test | testify junit` +* for MD format: `swift test | testify md` -Just use the [Swift Package Manager](https://theswiftdev.com/2017/11/09/swift-package-manager-tutorial/) as usual: +If no argument or wrong argument added then output format fallbacks to JSON! + +You can just use the [Swift Package Manager](https://theswiftdev.com/2017/11/09/swift-package-manager-tutorial/) as usual: ```swift -.package(url: "https://github.com/binarybirds/testify", from: "1.0.0"), +.package(url: "https://github.com/binarybirds/testify", from: "1.1.0"), ``` ⚠️ Don't forget to add "Testify" to your target as a dependency! @@ -32,4 +36,3 @@ Just use the [Swift Package Manager](https://theswiftdev.com/2017/11/09/swift-pa import Testify let suite = TestSuite.parse("test-output-string") -``` diff --git a/Sources/lib/Extensions/TestSuite+Parse.swift b/Sources/TestifySDK/Codable/RawTestResultDecoder.swift similarity index 56% rename from Sources/lib/Extensions/TestSuite+Parse.swift rename to Sources/TestifySDK/Codable/RawTestResultDecoder.swift index 0104909..1e7c3f1 100644 --- a/Sources/lib/Extensions/TestSuite+Parse.swift +++ b/Sources/TestifySDK/Codable/RawTestResultDecoder.swift @@ -1,25 +1,65 @@ // -// TestSuite+Parse.swift +// RawTestResultParser.swift // Testify // -// Created by Tibor BΓΆdecs on 2019. 01. 20.. +// Created by Tibor Bodecs on 2023. 02. 12.. // import Foundation -public extension TestSuite { +private extension String { + + func match(_ pattern: String) -> String? { + let regex = try! NSRegularExpression(pattern: pattern) + let matches = regex.matches( + in: self, + range: .init(location: 0, length: count) + ) + guard + let match = matches.first, + let range = Range(match.range, in: self) + else { + return nil + } + return String(self[range]) + } + + var matchedTestName: String? { + guard let match = match("(\\'.+\\')") else { + return nil + } + return String(match.dropFirst().dropLast()) + } - static func parse(_ output: String) -> TestSuite { - - let dateFormatter = DateFormatter() - dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" - + var matchedDate: String? { + match("(\\d{4}-\\d{2}-\\d{2}\\s\\d{2}\\:\\d{2}\\:\\d{2}\\.\\d{3})") + } + + var matchedSeconds: String? { + match("(\\d+\\.\\d+)") + } + + var matchedUnexpected: String? { + String(match("\\((\\d+)")!.dropFirst()) + } +} + +public struct RawTestResultDecoder { + + private let dateFormatter: DateFormatter + + public init() { + self.dateFormatter = .init() + self.dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" + } + + public func decode(_ input: String) throws -> TestSuite { var suites: [TestSuite] = [] var currentCaseName: String? var testCaseOutput: String! var gatherTestCaseOutput = false - let lines = output.split(separator: "\n").map({ String($0) }) + let lines = input.split(separator: "\n").map({ String($0) }) for (index, line) in lines.enumerated() { // start or end test suite if line.contains("Test Suite") { @@ -27,11 +67,15 @@ public extension TestSuite { let name = line.matchedTestName! let date = dateFormatter.date(from: line.matchedDate!)! - suites.append(TestSuite(name: name, - startDate: date, - endDate: date, - unexpected: 0, - outcome: .failure)) + suites.append( + TestSuite( + name: name, + startDate: date, + endDate: date, + unexpected: 0, + outcome: .failure + ) + ) continue; } else { @@ -44,7 +88,7 @@ public extension TestSuite { if index+1 < lines.count { let nextLine = lines[index+1] if nextLine.contains("Executed") { - suite.unexpected = Int(nextLine.matchedUnexpected!)! + suite.unexpected = UInt(nextLine.matchedUnexpected!)! } } @@ -71,12 +115,12 @@ public extension TestSuite { gatherTestCaseOutput = false var suite = suites.last! suites = Array(suites.dropLast()) - let outcome: TestOutcome = line.contains("passed") ? .success : .failure + let outcome: Outcome = line.contains("passed") ? .success : .failure let caseName = currentCaseName!.dropFirst(2).dropLast() let firstSplit = caseName.split(separator: ".") let secondSplit = firstSplit[1].split(separator: " ") - var failureInfo: TestFailureInfo? = nil + var failureInfo: FailureInfo? = nil if outcome == .failure { let outputSplit = testCaseOutput.split(separator: ":") let file = String(outputSplit[0]) @@ -84,15 +128,17 @@ public extension TestSuite { let reason = String(outputSplit.dropFirst(4) .joined(separator: ":") .trimmingCharacters(in: CharacterSet(charactersIn: "-").union(.whitespaces))) - failureInfo = TestFailureInfo(file: file, line: line, reason: reason) + failureInfo = FailureInfo(file: file, line: line, reason: reason) } - let testCase = TestCase(moduleName: String(firstSplit[0]), - className: String(secondSplit[0]), - testName: String(secondSplit[1]), - duration: TimeInterval(line.matchedSeconds!)!, - outcome: outcome, - failureInfo: failureInfo) + let testCase = TestCase( + moduleName: String(firstSplit[0]), + className: String(secondSplit[0]), + testName: String(secondSplit[1]), + duration: TimeInterval(line.matchedSeconds!)!, + outcome: outcome, + failureInfo: failureInfo + ) suite.cases.append(testCase) suites.append(suite) currentCaseName = nil diff --git a/Sources/TestifySDK/Codable/TestResultCodable.swift b/Sources/TestifySDK/Codable/TestResultCodable.swift new file mode 100644 index 0000000..c7ddfd0 --- /dev/null +++ b/Sources/TestifySDK/Codable/TestResultCodable.swift @@ -0,0 +1,24 @@ +// +// TestResultCodable.swift +// Testify +// +// Created by Tibor Bodecs on 2023. 02. 12.. +// + +import Foundation + +public enum TestResultEncoderError: Error { + case unknown +} + +public enum TestResultDecoderError: Error { + case unknown +} + +public protocol TestResultEncoder { + func encode(_: TestSuite) throws -> String +} + +public protocol TestResultDecoder { + func decode(_: String) throws -> TestSuite +} diff --git a/Sources/TestifySDK/Codable/TestResultJSONEncoder.swift b/Sources/TestifySDK/Codable/TestResultJSONEncoder.swift new file mode 100644 index 0000000..f15f88a --- /dev/null +++ b/Sources/TestifySDK/Codable/TestResultJSONEncoder.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// +// Created by Tibor Bodecs on 2023. 02. 12.. +// + +import Foundation + +struct TestResultJSONEncoder: TestResultEncoder { + + func encode(_ suite: TestSuite) throws -> String { + let encoder = JSONEncoder() + let data = try encoder.encode(suite) + guard let value = String(data: data, encoding: .utf8) else { + throw TestResultEncoderError.unknown + } + return value + } +} diff --git a/Sources/TestifySDK/Codable/TestResultJunitEncoder.swift b/Sources/TestifySDK/Codable/TestResultJunitEncoder.swift new file mode 100644 index 0000000..4362c73 --- /dev/null +++ b/Sources/TestifySDK/Codable/TestResultJunitEncoder.swift @@ -0,0 +1,68 @@ +// +// File.swift +// +// +// Created by Lengyel GΓ‘bor on 2023. 02. 15.. +// + +import Foundation + +public struct TestResultJunitEncoder: TestResultEncoder { + + public init() { + + } + + public func encode(_ input: TestSuite) throws -> String { + var restOfResult = "" + var allTests = 0 + var allTimes = 0.0 + var allFails = 0 + + let suites: [TestSuite] = input.children.reduce([]) { $0 + $1.children } + for suite in suites { + let start = suite.startDate + let name = suite.name + let tests = suite.cases.count + let time = suite.cases.reduce(0) { $0 + $1.duration } + let failureCount = suite.cases.reduce(0) { $0 + ($1.outcome == .failure ? 1 : 0) } + allTests += tests + allTimes += time + allFails += failureCount + restOfResult += "\n" + + for testCase in suite.cases { + let name = testCase.testName + let className = testCase.className + let success = testCase.outcome == .success + let time = testCase.duration + let failLine = testCase.failureInfo?.line + let failReason = testCase.failureInfo?.reason + + restOfResult += "\n" + restOfResult += "\(failReason ?? "")\n" + restOfResult += "\n" + restOfResult += "\n" + } else { + restOfResult += "/>\n" + } + } + } + restOfResult += "\n" + } + restOfResult += "\n" + + let formatter = DateFormatter() + formatter.dateFormat = "yyyyMMdd_HHmmss" + var startResult = "\n\n" + startResult += "\n" + + return startResult + restOfResult + } +} diff --git a/Sources/TestifySDK/Codable/TestResultMarkdownEncoder.swift b/Sources/TestifySDK/Codable/TestResultMarkdownEncoder.swift new file mode 100644 index 0000000..877e246 --- /dev/null +++ b/Sources/TestifySDK/Codable/TestResultMarkdownEncoder.swift @@ -0,0 +1,57 @@ +// +// File.swift +// +// +// Created by Tibor Bodecs on 2023. 02. 12.. +// + +import Foundation + +public struct TestResultMarkdownEncoder: TestResultEncoder { + + public init() { + + } + + public func encode(_ input: TestSuite) throws -> String { + var result = "" + + let suites: [TestSuite] = input.children.reduce([]) { $0 + $1.children } + for suite in suites { + result += "\n" + let name = suite.name + let count = suite.cases.count + let time = suite.cases.reduce(0) { $0 + $1.duration } + let successCount = suite.cases.reduce(0) { $0 + ($1.outcome == .success ? 1 : 0) } + let failureCount = suite.cases.reduce(0) { $0 + ($1.outcome == .failure ? 1 : 0) } + + result += "\(name): \(count) tests were completed in \(time) with \(successCount) passed, \(failureCount) failed and \(0) skipped.\n\n" + result += "| Test case | Passed | Failed | Skipped | Time |\n" + result += "| :--- | ---: | ---: | ---: | ---: |\n" + + for testCase in suite.cases { + let name = testCase.testName + let passed = testCase.outcome == .success ? "βœ…" : "" + let failed = testCase.outcome == .failure ? "❌" : "" + let skipped = "πŸ”€" + let time = "\(testCase.duration)s βŒ›οΈ" + result += "| \(name) | \(passed) | \(failed) | \(skipped) | \(time) |\n" + } + + } + + return result + } +} + +/* +| git status lorem ipsum dolor sit amet | git status | git status | 0 | 12.32s | +| git diff | git diff | git diff | 0 | 123.323s | +| git diff | git diff | git diff | 0 | 123.323s | +| git diff | git diff | git diff | 0 | 123.323s | +| [git diff](Sources/test/test.swift#L4) | git diff βœ… | git diff ❌ | 0 πŸ”€ | 123.323s βŒ›οΈ | +| git diff | git diff βœ… | git diff ❌ | 0 πŸ”€ | 123.323s βŒ›οΈ | +| git diff | git diff βœ… | git diff ❌ | 0 πŸ”€ | 123.323s βŒ›οΈ | +| git diff | git diff βœ… | git diff ❌ | 0 πŸ”€ | 123.323s βŒ›οΈ | +| git diff | git diff βœ… | git diff ❌ | 0 πŸ”€ | 123.323s βŒ›οΈ | +*/ diff --git a/Sources/TestifySDK/Models/FailureInfo.swift b/Sources/TestifySDK/Models/FailureInfo.swift new file mode 100644 index 0000000..d0eab1d --- /dev/null +++ b/Sources/TestifySDK/Models/FailureInfo.swift @@ -0,0 +1,24 @@ +// +// FailureInfo.swift +// Testify +// +// Created by Tibor BΓΆdecs on 2019. 01. 19.. +// + +import Foundation + +public struct FailureInfo: Codable { + public let file: String + public let line: Int + public let reason: String + + public init( + file: String, + line: Int, + reason: String + ) { + self.file = file + self.line = line + self.reason = reason + } +} diff --git a/Sources/lib/Models/TestOutcome.swift b/Sources/TestifySDK/Models/Outcome.swift similarity index 65% rename from Sources/lib/Models/TestOutcome.swift rename to Sources/TestifySDK/Models/Outcome.swift index 0277d15..e4a56f8 100644 --- a/Sources/lib/Models/TestOutcome.swift +++ b/Sources/TestifySDK/Models/Outcome.swift @@ -1,5 +1,5 @@ // -// TestOutcome.swift +// Outcome.swift // Testify // // Created by Tibor BΓΆdecs on 2019. 01. 18.. @@ -7,7 +7,7 @@ import Foundation -public enum TestOutcome: String, Codable { +public enum Outcome: String, Codable { case success case failure } diff --git a/Sources/TestifySDK/Models/OutputFormat.swift b/Sources/TestifySDK/Models/OutputFormat.swift new file mode 100644 index 0000000..6f40536 --- /dev/null +++ b/Sources/TestifySDK/Models/OutputFormat.swift @@ -0,0 +1,14 @@ +// +// File.swift +// +// +// Created by Lengyel GΓ‘bor on 2023. 02. 17.. +// + +import Foundation + +public enum OutputFormat : String { + case json + case junit + case md +} diff --git a/Sources/TestifySDK/Models/TestCase.swift b/Sources/TestifySDK/Models/TestCase.swift new file mode 100644 index 0000000..234877a --- /dev/null +++ b/Sources/TestifySDK/Models/TestCase.swift @@ -0,0 +1,34 @@ +// +// TestCase.swift +// Testify +// +// Created by Tibor BΓΆdecs on 2019. 01. 17.. +// + +import Foundation + +public struct TestCase: Codable { + public let moduleName: String + public let className: String + public let testName: String + public let duration: TimeInterval + public let outcome: Outcome + public let failureInfo: FailureInfo? + + public init( + moduleName: String, + className: String, + testName: String, + duration: TimeInterval, + outcome: Outcome, + failureInfo: FailureInfo? = nil + ) { + self.moduleName = moduleName + self.className = className + self.testName = testName + self.duration = duration + self.outcome = outcome + self.failureInfo = failureInfo + } + +} diff --git a/Sources/TestifySDK/Models/TestSuite.swift b/Sources/TestifySDK/Models/TestSuite.swift new file mode 100644 index 0000000..d69408c --- /dev/null +++ b/Sources/TestifySDK/Models/TestSuite.swift @@ -0,0 +1,46 @@ +// +// TestSuite.swift +// Testify +// +// Created by Tibor BΓΆdecs on 2019. 01. 17.. +// + +import Foundation + +public extension TestSuite { + + static func parse(_ input: String) -> TestSuite? { + let decoder = RawTestResultDecoder() + let suite = try! decoder.decode(input) + return suite + } + +} + +public struct TestSuite: Codable { + public let name: String + public let startDate: Date + public var endDate: Date + public var unexpected: UInt + public var outcome: Outcome + public var cases: [TestCase] + public var children: [TestSuite] + + public init( + name: String, + startDate: Date, + endDate: Date, + unexpected: UInt, + outcome: Outcome, + cases: [TestCase] = [], + children: [TestSuite] = [] + ) { + self.name = name + self.startDate = startDate + self.endDate = endDate + self.unexpected = unexpected + self.outcome = outcome + self.cases = cases + self.children = children + } +} diff --git a/Sources/cli/main.swift b/Sources/cli/main.swift deleted file mode 100644 index c163156..0000000 --- a/Sources/cli/main.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// String+Regex.swift -// Testify -// -// Created by Tibor BΓΆdecs on 2019. 01. 17.. -// - -import Foundation -import Testify - -var data: Data -var input: String = "" -repeat { - data = FileHandle.standardInput.availableData - input += String(data: data, encoding: .utf8)! -} while (data.count > 0) - - - -//let input = String(bytes: FileHandle.standardInput.availableData, encoding: .utf8)! -let suite = TestSuite.parse(input) -let encoder = JSONEncoder() -encoder.outputFormatting = .prettyPrinted -let jsonData = try! encoder.encode(suite) -print(String(data: jsonData, encoding: .utf8)!) diff --git a/Sources/lib/Extensions/String+Regex.swift b/Sources/lib/Extensions/String+Regex.swift deleted file mode 100644 index afd5c47..0000000 --- a/Sources/lib/Extensions/String+Regex.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// String+Regex.swift -// Testify -// -// Created by Tibor BΓΆdecs on 2019. 01. 17.. -// - -import Foundation - -extension String { - - func match(regex pattern: String) -> String? { - let regex = try! NSRegularExpression(pattern: pattern) - let matches = regex.matches(in: self, range: NSRange(location: 0, length: self.count)) - guard - let match = matches.first, - let range = Range(match.range, in: self) - else { - return nil - } - return String(self[range]) - } - - var matchedTestName: String? { - guard let match = self.match(regex: "(\\'.+\\')") else { - return nil - } - return String(match.dropFirst().dropLast()) - } - - var matchedDate: String? { - return self.match(regex: "(\\d{4}-\\d{2}-\\d{2}\\s\\d{2}\\:\\d{2}\\:\\d{2}\\.\\d{3})") - } - - var matchedSeconds: String? { - return self.match(regex: "(\\d+\\.\\d+)") - } - - var matchedUnexpected: String? { - return String(self.match(regex: "\\((\\d+)")!.dropFirst()) - } -} diff --git a/Sources/lib/Models/TestCase.swift b/Sources/lib/Models/TestCase.swift deleted file mode 100644 index 888dee2..0000000 --- a/Sources/lib/Models/TestCase.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// TestCase.swift -// Testify -// -// Created by Tibor BΓΆdecs on 2019. 01. 17.. -// - -import Foundation - -public struct TestCase: Codable { - - public var moduleName: String - public var className: String - public var testName: String - public var duration: TimeInterval - public var outcome: TestOutcome - public var failureInfo: TestFailureInfo? - - public init(moduleName: String, - className: String, - testName: String, - duration: TimeInterval, - outcome: TestOutcome, - failureInfo: TestFailureInfo? = nil) { - self.moduleName = moduleName - self.className = className - self.testName = testName - self.duration = duration - self.outcome = outcome - self.failureInfo = failureInfo - } -} diff --git a/Sources/lib/Models/TestFailureInfo.swift b/Sources/lib/Models/TestFailureInfo.swift deleted file mode 100644 index 59b5bfe..0000000 --- a/Sources/lib/Models/TestFailureInfo.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// TestFailureInfo.swift -// Testify -// -// Created by Tibor BΓΆdecs on 2019. 01. 19.. -// - -import Foundation - -public struct TestFailureInfo: Codable { - - public var file: String - public var line: Int - public var reason: String - - public init(file: String, line: Int, reason: String) { - self.file = file - self.line = line - self.reason = reason - } -} diff --git a/Sources/lib/Models/TestSuite.swift b/Sources/lib/Models/TestSuite.swift deleted file mode 100644 index 944d8fc..0000000 --- a/Sources/lib/Models/TestSuite.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// TestSuite.swift -// Testify -// -// Created by Tibor BΓΆdecs on 2019. 01. 17.. -// - -import Foundation - -public struct TestSuite: Codable { - - public var name: String - public var startDate: Date - public var endDate: Date - public var unexpected: Int - public var outcome: TestOutcome - public var cases: [TestCase] - public var children: [TestSuite] - - public init(name: String, - startDate: Date, - endDate: Date, - unexpected: Int, - outcome: TestOutcome, - cases: [TestCase] = [], - children: [TestSuite] = []) { - self.name = name - self.startDate = startDate - self.endDate = endDate - self.unexpected = unexpected - self.outcome = outcome - self.cases = cases - self.children = children - } -} diff --git a/Sources/testify/main.swift b/Sources/testify/main.swift new file mode 100644 index 0000000..fb85b26 --- /dev/null +++ b/Sources/testify/main.swift @@ -0,0 +1,54 @@ +// +// main.swift +// Testify +// +// Created by Tibor BΓΆdecs on 2019. 01. 17.. +// + +import Foundation +import TestifySDK + +let args = CommandLine.arguments +var format: String = OutputFormat.json.rawValue +let msg = "Testify output format is" +if (args.count >= 2) { + if let enumCase = OutputFormat(rawValue: args[1]) { + format = enumCase.rawValue + print(msg, "'\(format)'") + } else { + print("Unknown Testify output format, the format is 'json' for now. Available formats: 'json', 'junit', 'md'") + } +} else { + print(msg, "'json'") +} + +var data: Data +var input: String = "" +repeat { + data = FileHandle.standardInput.availableData + input += String(data: data, encoding: .utf8)! +} while (data.count > 0) + +let decoder = RawTestResultDecoder() +let suite = try decoder.decode(input) + +switch format { +case OutputFormat.json.rawValue: + let encoder = JSONEncoder() + encoder.outputFormatting = .prettyPrinted + let jsonData = try! encoder.encode(suite) + print("\n", String(data: jsonData, encoding: .utf8)!, "\n") + +case OutputFormat.junit.rawValue: + let encoder = TestResultJunitEncoder() + let junitData = try! encoder.encode(suite) + print(junitData) + +case OutputFormat.md.rawValue: + let encoder = TestResultMarkdownEncoder() + let mdData = try! encoder.encode(suite) + print(mdData) + +default: + print("Unknown output format") +} diff --git a/Tests/Assets/Alamofire.json b/Tests/Assets/json/Alamofire.json similarity index 100% rename from Tests/Assets/Alamofire.json rename to Tests/Assets/json/Alamofire.json diff --git a/Tests/Assets/Kitura-coverage.json b/Tests/Assets/json/Kitura-coverage.json similarity index 100% rename from Tests/Assets/Kitura-coverage.json rename to Tests/Assets/json/Kitura-coverage.json diff --git a/Tests/Assets/Kitura.json b/Tests/Assets/json/Kitura.json similarity index 100% rename from Tests/Assets/Kitura.json rename to Tests/Assets/json/Kitura.json diff --git a/Tests/Assets/PromiseFailure.json b/Tests/Assets/json/PromiseFailure.json similarity index 100% rename from Tests/Assets/PromiseFailure.json rename to Tests/Assets/json/PromiseFailure.json diff --git a/Tests/Assets/PromiseUnexpectedFailure.json b/Tests/Assets/json/PromiseUnexpectedFailure.json similarity index 100% rename from Tests/Assets/PromiseUnexpectedFailure.json rename to Tests/Assets/json/PromiseUnexpectedFailure.json diff --git a/Tests/Assets/Shell-coverage.json b/Tests/Assets/json/Shell-coverage.json similarity index 100% rename from Tests/Assets/Shell-coverage.json rename to Tests/Assets/json/Shell-coverage.json diff --git a/Tests/Assets/Shell.json b/Tests/Assets/json/Shell.json similarity index 100% rename from Tests/Assets/Shell.json rename to Tests/Assets/json/Shell.json diff --git a/Tests/Assets/ShellFailure.json b/Tests/Assets/json/ShellFailure.json similarity index 100% rename from Tests/Assets/ShellFailure.json rename to Tests/Assets/json/ShellFailure.json diff --git a/Tests/Assets/ShellOutFailure.json b/Tests/Assets/json/ShellOutFailure.json similarity index 100% rename from Tests/Assets/ShellOutFailure.json rename to Tests/Assets/json/ShellOutFailure.json diff --git a/Tests/Assets/md/Alamofire.md b/Tests/Assets/md/Alamofire.md new file mode 100644 index 0000000..1073ea3 --- /dev/null +++ b/Tests/Assets/md/Alamofire.md @@ -0,0 +1,778 @@ +AutomaticValidationTestCase: 5 tests were completed in 1.502 with 5 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatValidationForRequestWithAcceptableComplexContentTypeResponseSucceeds | βœ… | | πŸ”€ | 0.786s βŒ›οΈ | +| testThatValidationForRequestWithAcceptableStatusCodeAndContentTypeResponseSucceeds | βœ… | | πŸ”€ | 0.178s βŒ›οΈ | +| testThatValidationForRequestWithAcceptableWildcardContentTypeResponseSucceeds | βœ… | | πŸ”€ | 0.179s βŒ›οΈ | +| testThatValidationForRequestWithUnacceptableContentTypeResponseFails | βœ… | | πŸ”€ | 0.18s βŒ›οΈ | +| testThatValidationForRequestWithUnacceptableStatusCodeResponseFails | βœ… | | πŸ”€ | 0.179s βŒ›οΈ | + +BasicAuthenticationTestCase: 3 tests were completed in 2.3680000000000003 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testHiddenHTTPBasicAuthentication | βœ… | | πŸ”€ | 0.348s βŒ›οΈ | +| testHTTPBasicAuthenticationWithInvalidCredentials | βœ… | | πŸ”€ | 1.066s βŒ›οΈ | +| testHTTPBasicAuthenticationWithValidCredentials | βœ… | | πŸ”€ | 0.954s βŒ›οΈ | + +CacheTestCase: 5 tests were completed in 13.501999999999999 with 5 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testDefaultCachePolicy | βœ… | | πŸ”€ | 3.235s βŒ›οΈ | +| testIgnoreLocalCacheDataPolicy | βœ… | | πŸ”€ | 3.221s βŒ›οΈ | +| testURLCacheContainsCachedResponsesForAllRequests | βœ… | | πŸ”€ | 2.298s βŒ›οΈ | +| testUseLocalCacheDataAndDontLoadFromNetworkPolicy | βœ… | | πŸ”€ | 2.364s βŒ›οΈ | +| testUseLocalCacheDataIfExistsOtherwiseLoadFromNetworkPolicy | βœ… | | πŸ”€ | 2.384s βŒ›οΈ | + +ContentTypeValidationTestCase: 6 tests were completed in 1.605 with 6 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatValidationForRequestWithAcceptableContentTypeResponseSucceeds | βœ… | | πŸ”€ | 0.184s βŒ›οΈ | +| testThatValidationForRequestWithAcceptableWildcardContentTypeResponseSucceeds | βœ… | | πŸ”€ | 0.182s βŒ›οΈ | +| testThatValidationForRequestWithAcceptableWildcardContentTypeResponseSucceedsWhenResponseIsNil | βœ… | | πŸ”€ | 0.679s βŒ›οΈ | +| testThatValidationForRequestWithNoAcceptableContentTypeResponseFails | βœ… | | πŸ”€ | 0.183s βŒ›οΈ | +| testThatValidationForRequestWithNoAcceptableContentTypeResponseSucceedsWhenNoDataIsReturned | βœ… | | πŸ”€ | 0.185s βŒ›οΈ | +| testThatValidationForRequestWithUnacceptableContentTypeResponseFails | βœ… | | πŸ”€ | 0.192s βŒ›οΈ | + +CustomResponseSerializerTestCases: 1 tests were completed in 0.187 with 1 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatCustomResponseSerializersCanBeWrittenWithoutCompilerIssues | βœ… | | πŸ”€ | 0.187s βŒ›οΈ | + +CustomValidationTestCase: 4 tests were completed in 0.73 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatCustomValidationCanThrowCustomError | βœ… | | πŸ”€ | 0.193s βŒ›οΈ | +| testThatCustomValidationClosureHasAccessToServerResponseData | βœ… | | πŸ”€ | 0.179s βŒ›οΈ | +| testThatValidationExtensionCanThrowCustomError | βœ… | | πŸ”€ | 0.177s βŒ›οΈ | +| testThatValidationExtensionHasAccessToServerResponseData | βœ… | | πŸ”€ | 0.181s βŒ›οΈ | + +DataResponseSerializationTestCase: 22 tests were completed in 0.059000000000000025 with 22 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatDataResponseSerializerFailsWhenDataIsNil | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDataResponseSerializerFailsWhenDataIsNilWithNonEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDataResponseSerializerFailsWhenErrorIsNotNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDataResponseSerializerSucceedsWhenDataIsNilWithEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDataResponseSerializerSucceedsWhenDataIsNotNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenDataIsEmpty | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenDataIsInvalidJSON | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenDataIsNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenDataIsNilWithNonEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenErrorIsNotNil | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatJSONResponseSerializerSucceedsWhenDataIsNilWithEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatJSONResponseSerializerSucceedsWhenDataIsValidJSON | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenDataIsEmpty | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenDataIsNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenDataIsNilWithNonEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenErrorIsNotNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWithUTF32DataAndUTF8ProvidedEncoding | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatStringResponseSerializerFailsWithUTF32DataAndUTF8ResponseEncoding | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerSucceedsWhenDataIsNilWithEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerSucceedsWithUTF8DataAndNoProvidedEncoding | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerSucceedsWithUTF8DataAndUTF8ProvidedEncoding | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatStringResponseSerializerSucceedsWithUTF8DataUsingResponseTextEncodingName | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | + +DecodableResponseSerializerTests: 7 tests were completed in 0.019 with 7 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatDecodableResponseSerializerFailsWhenDataIsEmpty | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDecodableResponseSerializerFailsWhenDataIsInvalidRepresentation | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatDecodableResponseSerializerFailsWhenDataIsNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDecodableResponseSerializerFailsWhenDataIsNilWithNonEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDecodableResponseSerializerFailsWhenErrorIsNotNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDecodableResponseSerializerSucceedsWhenDataIsNilWithEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDecodableResponseSerializerSucceedsWhenDataIsValidJSON | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | + +DownloadInitializationTestCase: 2 tests were completed in 0.335 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testDownloadClassMethodWithMethodURLAndDestination | βœ… | | πŸ”€ | 0.169s βŒ›οΈ | +| testDownloadClassMethodWithMethodURLHeadersAndDestination | βœ… | | πŸ”€ | 0.166s βŒ›οΈ | + +DownloadResponseFlatMapErrorTestCase: 3 tests were completed in 3.105 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatFlatMapErrorCatchesTransformationError | βœ… | | πŸ”€ | 2.919s βŒ›οΈ | +| testThatFlatMapErrorPreservesSuccessValue | βœ… | | πŸ”€ | 0.176s βŒ›οΈ | +| testThatFlatMapErrorTransformsError | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | + +DownloadResponseFlatMapTestCase: 3 tests were completed in 0.371 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatFlatMapCatchesTransformationError | βœ… | | πŸ”€ | 0.189s βŒ›οΈ | +| testThatFlatMapPreservesFailureError | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatFlatMapTransformsSuccessValue | βœ… | | πŸ”€ | 0.173s βŒ›οΈ | + +DownloadResponseMapErrorTestCase: 2 tests were completed in 0.18 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatMapErrorPreservesSuccessValue | βœ… | | πŸ”€ | 0.172s βŒ›οΈ | +| testThatMapErrorTransformsFailureValue | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | + +DownloadResponseMapTestCase: 2 tests were completed in 0.183 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatMapPreservesFailureError | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatMapTransformsSuccessValue | βœ… | | πŸ”€ | 0.174s βŒ›οΈ | + +DownloadResponseSerializationTestCase: 26 tests were completed in 0.07300000000000002 with 26 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatDataResponseSerializerFailsWhenErrorIsNotNil | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDataResponseSerializerFailsWhenFileDataIsEmpty | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDataResponseSerializerFailsWhenFileURLIsInvalid | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDataResponseSerializerFailsWhenFileURLIsNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDataResponseSerializerFailsWhenFileURLIsNilWithNonEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDataResponseSerializerSucceedsWhenDataIsNilWithEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDataResponseSerializerSucceedsWhenFileDataIsNotNil | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenDataIsInvalidJSON | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenDataIsNilWithNonEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenErrorIsNotNil | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenFileDataIsEmpty | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenFileURLIsInvalid | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatJSONResponseSerializerFailsWhenFileURLIsNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatJSONResponseSerializerSucceedsWhenDataIsNilWithEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatJSONResponseSerializerSucceedsWhenDataIsValidJSON | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenDataIsNilWithNonEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenErrorIsNotNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenFileDataIsEmpty | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenFileURLIsInvalid | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWhenFileURLIsNil | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatStringResponseSerializerFailsWithUTF32DataAndUTF8ProvidedEncoding | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testThatStringResponseSerializerFailsWithUTF32DataAndUTF8ResponseEncoding | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatStringResponseSerializerSucceedsWhenDataIsNilWithEmptyResponseStatusCode | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatStringResponseSerializerSucceedsWithUTF8DataAndNoProvidedEncoding | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatStringResponseSerializerSucceedsWithUTF8DataAndUTF8ProvidedEncoding | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testThatStringResponseSerializerSucceedsWithUTF8DataUsingResponseTextEncodingName | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | + +DownloadResponseTestCase: 9 tests were completed in 2.138 with 9 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testCancelledDownloadRequest | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testDownloadRequest | βœ… | | πŸ”€ | 0.329s βŒ›οΈ | +| testDownloadRequestWithHeaders | βœ… | | πŸ”€ | 0.169s βŒ›οΈ | +| testDownloadRequestWithParameters | βœ… | | πŸ”€ | 0.175s βŒ›οΈ | +| testDownloadRequestWithProgress | βœ… | | πŸ”€ | 0.696s βŒ›οΈ | +| testThatDownloadingFileAndMovingToDestinationThatIsOccupiedThrowsError | βœ… | | πŸ”€ | 0.202s βŒ›οΈ | +| testThatDownloadingFileAndMovingToDirectoryThatDoesNotExistThrowsError | βœ… | | πŸ”€ | 0.184s βŒ›οΈ | +| testThatDownloadOptionsCanCreateIntermediateDirectoriesPriorToMovingFile | βœ… | | πŸ”€ | 0.192s βŒ›οΈ | +| testThatDownloadOptionsCanRemovePreviousFilePriorToMovingFile | βœ… | | πŸ”€ | 0.186s βŒ›οΈ | + +DownloadResumeDataTestCase: 3 tests were completed in 5.079000000000001 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatCancelledDownloadCanBeResumedWithResumeData | βœ… | | πŸ”€ | 4.014s βŒ›οΈ | +| testThatCancelledDownloadResponseDataMatchesResumeData | βœ… | | πŸ”€ | 0.546s βŒ›οΈ | +| testThatCancelledDownloadResumeDataIsAvailableWithJSONResponseSerializer | βœ… | | πŸ”€ | 0.519s βŒ›οΈ | + +HTTPDigestAuthenticationTestCase: 2 tests were completed in 1.915 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testHTTPDigestAuthenticationWithInvalidCredentials | βœ… | | πŸ”€ | 1.057s βŒ›οΈ | +| testHTTPDigestAuthenticationWithValidCredentials | βœ… | | πŸ”€ | 0.858s βŒ›οΈ | + +HTTPHeadersTests: 6 tests were completed in 0.013000000000000001 with 6 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testHeadersAreStoreUniquelyByCaseInsensitiveName | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testHeadersCanBeProperlySortedByName | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testHeadersCanInsensitivelyGetAndSetThroughSubscript | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testHeadersHaveUnsortedDescription | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testHeadersPreserveLastFormAndValueOfAName | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testHeadersPreserveOrderOfInsertion | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | + +JSONParameterEncoderTests: 5 tests were completed in 0.013 with 5 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatDataIsProperlyEncodedAndProperContentTypeIsSet | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDataIsProperlyEncodedButContentTypeIsNotSetIfRequestAlreadyHasAContentType | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatJSONEncoderCanBeCustomized | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatJSONEncoderDefaultWorks | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatJSONEncoderPrettyPrintedPrintsPretty | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | + +JSONParameterEncodingTestCase: 4 tests were completed in 0.01 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testJSONParameterEncodeArray | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testJSONParameterEncodeComplexParameters | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testJSONParameterEncodeNilParameters | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testJSONParameterEncodeParametersRetainsCustomContentType | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | + +MultipartFormDataEncodingTestCase: 7 tests were completed in 0.049 with 7 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testEncodingDataBodyPart | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncodingFileBodyPart | βœ… | | πŸ”€ | 0.021s βŒ›οΈ | +| testEncodingMultipleBodyPartsWithVaryingTypes | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testEncodingMultipleDataBodyParts | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncodingMultipleFileBodyParts | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testEncodingMultipleStreamBodyParts | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testEncodingStreamBodyPart | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | + +MultipartFormDataFailureTestCase: 6 tests were completed in 0.021 with 6 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatAppendingFileBodyPartThatIsDirectoryReturnsError | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatAppendingFileBodyPartThatIsNotFileURLReturnsError | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatAppendingFileBodyPartThatIsNotReachableReturnsError | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatAppendingFileBodyPartWithInvalidLastPathComponentReturnsError | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatWritingEncodedDataToBadURLFails | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatWritingEncodedDataToExistingFileURLFails | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | + +MultipartFormDataPropertiesTestCase: 2 tests were completed in 0.006 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatContentLengthMatchesTotalBodyPartSize | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatContentTypeContainsBoundary | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | + +MultipartFormDataWriteEncodedDataToDiskTestCase: 7 tests were completed in 0.041999999999999996 with 7 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testWritingEncodedDataBodyPartToDisk | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testWritingEncodedFileBodyPartToDisk | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testWritingEncodedStreamBodyPartToDisk | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testWritingMultipleEncodedBodyPartsWithVaryingTypesToDisk | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testWritingMultipleEncodedDataBodyPartsToDisk | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testWritingMultipleEncodedFileBodyPartsToDisk | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testWritingMultipleEncodedStreamBodyPartsToDisk | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | + +MultipleValidationTestCase: 3 tests were completed in 0.5429999999999999 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatValidationForRequestWithAcceptableStatusCodeAndContentTypeResponseSucceeds | βœ… | | πŸ”€ | 0.178s βŒ›οΈ | +| testThatValidationForRequestWithUnacceptableStatusCodeAndContentTypeResponseFailsWithContentTypeError | βœ… | | πŸ”€ | 0.181s βŒ›οΈ | +| testThatValidationForRequestWithUnacceptableStatusCodeAndContentTypeResponseFailsWithStatusCodeError | βœ… | | πŸ”€ | 0.184s βŒ›οΈ | + +NetworkReachabilityManagerTestCase: 17 tests were completed in 0.05200000000000002 with 17 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatAddressManagerCanBeDeinitialized | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatAddressManagerIsNotifiedWhenStartListeningIsCalled | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatAddressManagerStartsWithReachableStatus | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatHostManagerCanBeDeinitialized | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatHostManagerIsNotifiedWhenStartListeningIsCalled | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatHostManagerIsReachableOnWiFi | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatHostManagerStartsWithReachableStatus | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatManagerCanBeInitializedFromAddress | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatManagerCanBeInitializedFromHost | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatManagerReturnsNotReachableOnWWANStatusWhenIsWWANAndConnectionIsRequired | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatManagerReturnsNotReachableStatusWhenConnectionIsRequired | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatManagerReturnsNotReachableStatusWhenInterventionIsRequired | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatManagerReturnsNotReachableStatusWhenReachableFlagIsAbsent | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatManagerReturnsReachableOnWiFiStatusWhenConnectionIsNotRequired | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatManagerReturnsReachableOnWiFiStatusWhenConnectionIsOnDemand | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatManagerReturnsReachableOnWiFiStatusWhenConnectionIsOnTraffic | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatManagerReturnsReachableOnWWANStatusWhenIsWWAN | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | + +RequestDebugDescriptionTestCase: 9 tests were completed in 4.523999999999999 with 9 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testGETRequestDebugDescription | βœ… | | πŸ”€ | 0.646s βŒ›οΈ | +| testGETRequestWithDuplicateHeadersDebugDescription | βœ… | | πŸ”€ | 0.658s βŒ›οΈ | +| testGETRequestWithJSONHeaderDebugDescription | βœ… | | πŸ”€ | 0.652s βŒ›οΈ | +| testMultipartFormDataRequestWithDuplicateHeadersDebugDescription | βœ… | | πŸ”€ | 0.599s βŒ›οΈ | +| testPOSTRequestDebugDescription | βœ… | | πŸ”€ | 0.605s βŒ›οΈ | +| testPOSTRequestWithCookieDebugDescription | βœ… | | πŸ”€ | 0.682s βŒ›οΈ | +| testPOSTRequestWithCookiesDisabledDebugDescription | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testPOSTRequestWithJSONParametersDebugDescription | βœ… | | πŸ”€ | 0.666s βŒ›οΈ | +| testThatRequestWithInvalidURLDebugDescription | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | + +RequestDescriptionTestCase: 1 tests were completed in 0.733 with 1 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testRequestDescription | βœ… | | πŸ”€ | 0.733s βŒ›οΈ | + +RequestResponseTestCase: 8 tests were completed in 3.2600000000000002 with 8 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testPOSTRequestWithBase64EncodedImages | βœ… | | πŸ”€ | 1.134s βŒ›οΈ | +| testPOSTRequestWithUnicodeParameters | βœ… | | πŸ”€ | 0.188s βŒ›οΈ | +| testRequestResponse | βœ… | | πŸ”€ | 0.191s βŒ›οΈ | +| testRequestResponseWithProgress | βœ… | | πŸ”€ | 0.578s βŒ›οΈ | +| testThatRequestsCanPassEncodableParametersAsAURLQuery | βœ… | | πŸ”€ | 0.184s βŒ›οΈ | +| testThatRequestsCanPassEncodableParametersAsJSONBodyData | βœ… | | πŸ”€ | 0.184s βŒ›οΈ | +| testThatRequestsCanPassEncodableParametersAsURLEncodedBodyData | βœ… | | πŸ”€ | 0.188s βŒ›οΈ | +| testThatResponseSerializationWorksWithSerializationQueue | βœ… | | πŸ”€ | 0.613s βŒ›οΈ | + +ResponseDataTestCase: 2 tests were completed in 0.191 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatResponseDataReturnsFailureResultWithOptionalDataAndError | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatResponseDataReturnsSuccessResultWithValidData | βœ… | | πŸ”€ | 0.18s βŒ›οΈ | + +ResponseFlatMapErrorTestCase: 3 tests were completed in 0.201 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatFlatMapErrorCatchesTransformationError | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatFlatMapErrorPreservesSuccessValue | βœ… | | πŸ”€ | 0.182s βŒ›οΈ | +| testThatFlatMapErrorTransformsError | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | + +ResponseFlatMapTestCase: 3 tests were completed in 0.38 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatFlatMapCatchesTransformationError | βœ… | | πŸ”€ | 0.182s βŒ›οΈ | +| testThatFlatMapPreservesFailureError | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatFlatMapTransformsSuccessValue | βœ… | | πŸ”€ | 0.187s βŒ›οΈ | + +ResponseJSONDecodableTestCase: 2 tests were completed in 0.192 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatResponseJSONReturnsSuccessResultWithValidJSON | βœ… | | πŸ”€ | 0.182s βŒ›οΈ | +| testThatResponseStringReturnsFailureResultWithOptionalDataAndError | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | + +ResponseJSONTestCase: 4 tests were completed in 0.564 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatResponseJSONReturnsSuccessResultForGETRequest | βœ… | | πŸ”€ | 0.186s βŒ›οΈ | +| testThatResponseJSONReturnsSuccessResultForPOSTRequest | βœ… | | πŸ”€ | 0.18s βŒ›οΈ | +| testThatResponseJSONReturnsSuccessResultWithValidJSON | βœ… | | πŸ”€ | 0.187s βŒ›οΈ | +| testThatResponseStringReturnsFailureResultWithOptionalDataAndError | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | + +ResponseMapErrorTestCase: 2 tests were completed in 0.193 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatMapErrorPreservesSuccessValue | βœ… | | πŸ”€ | 0.183s βŒ›οΈ | +| testThatMapErrorTransformsFailureValue | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | + +ResponseMapTestCase: 2 tests were completed in 0.218 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatMapPreservesFailureError | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | +| testThatMapTransformsSuccessValue | βœ… | | πŸ”€ | 0.206s βŒ›οΈ | + +ResponseStringTestCase: 2 tests were completed in 0.193 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatResponseStringReturnsFailureResultWithOptionalDataAndError | βœ… | | πŸ”€ | 0.013s βŒ›οΈ | +| testThatResponseStringReturnsSuccessResultWithValidString | βœ… | | πŸ”€ | 0.18s βŒ›οΈ | + +ResponseTestCase: 2 tests were completed in 0.199 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatResponseReturnsFailureResultWithOptionalDataAndError | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatResponseReturnsSuccessResultWithValidData | βœ… | | πŸ”€ | 0.189s βŒ›οΈ | + +ResultTestCase: 34 tests were completed in 0.08800000000000005 with 34 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testFlatMapErrorCapturesThrownError | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testFlatMapErrorTransformsErrorValue | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testFunctionalMethodsCanBeChained | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testIfFailureDoesNotExecuteWhenSuccess | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testIfFailureExecutesWhenFailure | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testIfSuccessDoesNotExecutesWhenFailure | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testIfSuccessExecutesWhenSuccess | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testMapErrorPreservesSuccessError | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testMapErrorTransformsErrorValue | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDebugDescriptionStringMatchesExpectedValueForFailureCase | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDebugDescriptionStringMatchesExpectedValueForSuccessCase | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatDescriptionStringMatchesExpectedValueForFailureCase | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatDescriptionStringMatchesExpectedValueForSuccessCase | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatErrorPropertyReturnsErrorForFailureCase | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatErrorPropertyReturnsNilForSuccessCase | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatFlatMapCatchesTransformationError | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatFlatMapPreservesFailureError | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatFlatMapTransformsSuccessValue | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatInitializerFromThrowingClosureCatchesErrorAsAFailure | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatInitializerFromThrowingClosureStoresResultAsASuccess | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatIsFailurePropertyReturnsFalseForSuccessCase | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatIsFailurePropertyReturnsTrueForFailureCase | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatIsSuccessPropertyReturnsFalseForFailureCase | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatIsSuccessPropertyReturnsTrueForSuccessCase | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatMapPreservesFailureError | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatMapTransformsSuccessValue | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatUnwrapReturnsSuccessValue | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatUnwrapThrowsFailureError | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatValuePropertyReturnsNilForFailureCase | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatValuePropertyReturnsValueForSuccessCase | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testWithErrorDoesNotExecuteWhenSuccess | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testWithErrorExecutesWhenFailure | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testWithValueDoesNotExecutesWhenFailure | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testWithValueExecutesWhenSuccess | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | + +ServerTrustPolicyCertificatesInBundleTestCase: 1 tests were completed in 0.019 with 1 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testOnlyValidCertificatesAreDetected | βœ… | | πŸ”€ | 0.019s βŒ›οΈ | + +ServerTrustPolicyCompositeTestCase: 3 tests were completed in 0.041 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatExpiredLeafCertificateFailsDefaultAndRevocationComposite | βœ… | | πŸ”€ | 0.017s βŒ›οΈ | +| testThatNonAnchoredRootCertificateChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatValidCertificateChainPassesDefaultAndRevocationCompositeChecks | βœ… | | πŸ”€ | 0.015s βŒ›οΈ | + +ServerTrustPolicyDisableEvaluationTestCase: 2 tests were completed in 0.005 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatCertificateChainMissingIntermediateCertificatePassesEvaluation | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatExpiredLeafCertificatePassesEvaluation | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | + +ServerTrustPolicyExplorationBasicX509PolicyValidationTestCase: 4 tests were completed in 0.03 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatAnchoredRootCertificatePassesBasicX509ValidationWithoutRootInTrust | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatAnchoredRootCertificatePassesBasicX509ValidationWithRootInTrust | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testThatCertificateMissingDNSNamePassesBasicX509Validation | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatExpiredCertificateFailsBasicX509Validation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | + +ServerTrustPolicyExplorationSSLPolicyValidationTestCase: 9 tests were completed in 0.066 with 9 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatAnchoredRootCertificatePassesSSLValidationWithoutRootInTrust | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatAnchoredRootCertificatePassesSSLValidationWithRootInTrust | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatCertificateMissingDNSNameFailsSSLValidation | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatDNSNameCertificatePassesSSLValidation | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatExpiredCertificateFailsSSLValidation | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testThatMultipleDNSNamesCertificatePassesSSLValidationForAllEntries | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatPassingNilForHostParameterAllowsCertificateMissingDNSNameToPassSSLValidation | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testThatURICertificateFailsSSLValidation | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatWildcardCertificatePassesSSLValidation | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | + +ServerTrustPolicyPerformDefaultEvaluationTestCase: 11 tests were completed in 0.094 with 11 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatExpiredCertificateChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatExpiredCertificateChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatMissingDNSNameLeafCertificateFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatMissingDNSNameLeafCertificatePassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatMissingIntermediateCertificateInChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatMissingIntermediateCertificateInChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatNonAnchoredRootCertificateChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatNonAnchoredRootCertificateChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatValidCertificateChainPassesEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatValidCertificateChainPassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatWildcardedLeafCertificateChainPassesEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | + +ServerTrustPolicyPerformRevokedEvaluationTestCase: 11 tests were completed in 0.11699999999999999 with 11 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatExpiredCertificateChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testThatExpiredCertificateChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatMissingDNSNameLeafCertificateFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.014s βŒ›οΈ | +| testThatMissingDNSNameLeafCertificatePassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatMissingIntermediateCertificateInChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatMissingIntermediateCertificateInChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatNonAnchoredRootCertificateChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testThatNonAnchoredRootCertificateChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatValidCertificateChainPassesEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.018s βŒ›οΈ | +| testThatValidCertificateChainPassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | +| testThatWildcardedLeafCertificateChainPassesEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.015s βŒ›οΈ | + +ServerTrustPolicyPinCertificatesTestCase: 23 tests were completed in 0.23100000000000007 with 23 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatPinnedIntermediateCertificatePassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatPinnedIntermediateCertificatePassesEvaluationWithSelfSignedSupportAndHostValidation | βœ… | | πŸ”€ | 0.014s βŒ›οΈ | +| testThatPinnedIntermediateCertificateWithoutCertificateChainValidationPassesEvaluation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatPinnedLeafCertificatePassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatPinnedLeafCertificatePassesEvaluationWithSelfSignedSupportAndHostValidation | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatPinnedLeafCertificateWithoutCertificateChainValidationPassesEvaluation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatPinnedRootCertificatePassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatPinnedRootCertificatePassesEvaluationWithSelfSignedSupportAndHostValidation | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | +| testThatPinnedRootCertificateWithoutCertificateChainValidationPassesEvaluation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatPinningExpiredLeafCertificateFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatPinningExpiredLeafCertificateFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatPinningExpiredLeafCertificateWithoutCertificateChainValidationPassesEvaluation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatPinningIntermediateCertificateNotInCertificateChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatPinningIntermediateCertificateNotInCertificateChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatPinningIntermediateCertificateNotInCertificateChainWithoutCertificateChainValidationFailsEvaluation | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testThatPinningIntermediateCertificateWithExpiredLeafCertificateFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatPinningIntermediateCertificateWithExpiredLeafCertificateFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | +| testThatPinningIntermediateCertificateWithExpiredLeafCertificateWithoutCertificateChainValidationPassesEvaluation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatPinningLeafCertificateNotInCertificateChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testThatPinningLeafCertificateNotInCertificateChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatPinningLeafCertificateNotInCertificateChainWithoutCertificateChainValidationFailsEvaluation | βœ… | | πŸ”€ | 0.013s βŒ›οΈ | +| testThatPinningMultipleCertificatesWithoutCertificateChainValidationPassesEvaluation | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | +| testThatPinningRootCertificateWithExpiredLeafCertificateWithoutCertificateChainValidationPassesEvaluation | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | + +ServerTrustPolicyPinPublicKeysTestCase: 16 tests were completed in 0.14100000000000001 with 16 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatPinningBackupKeyPassesEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatPinningBackupKeyPassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatPinningIntermediateKeyPassesEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.01s βŒ›οΈ | +| testThatPinningIntermediateKeyPassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatPinningIntermediateKeyWithoutCertificateChainValidationPassesEvaluationWithExpiredLeafCertificate | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testThatPinningKeyNotInCertificateChainFailsEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.013s βŒ›οΈ | +| testThatPinningKeyNotInCertificateChainFailsEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testThatPinningLeafKeyPassesEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | +| testThatPinningLeafKeyPassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testThatPinningLeafKeyWithoutCertificateChainValidationPassesEvaluationWithExpiredLeafCertificate | βœ… | | πŸ”€ | 0.009s βŒ›οΈ | +| testThatPinningLeafKeyWithoutCertificateChainValidationPassesEvaluationWithIncorrectIntermediateCertificate | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatPinningLeafKeyWithoutCertificateChainValidationPassesEvaluationWithMissingIntermediateCertificate | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatPinningRootKeyPassesEvaluationWithHostValidation | βœ… | | πŸ”€ | 0.014s βŒ›οΈ | +| testThatPinningRootKeyPassesEvaluationWithoutHostValidation | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatPinningRootKeyWithoutCertificateChainValidationFailsEvaluationWithMissingIntermediateCertificate | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatPinningRootKeyWithoutCertificateChainValidationPassesEvaluationWithExpiredLeafCertificate | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | + +SessionDelegateTestCase: 4 tests were completed in 3.583 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatAppropriateNotificationsAreCalledWithRequestForDataRequest | βœ… | | πŸ”€ | 0.735s βŒ›οΈ | +| testThatDidCompleteNotificationIsCalledWithRequestForDownloadRequests | βœ… | | πŸ”€ | 0.631s βŒ›οΈ | +| testThatRequestWillPerformHTTPRedirectionByDefault | βœ… | | πŸ”€ | 0.85s βŒ›οΈ | +| testThatRequestWillPerformRedirectionMultipleTimesByDefault | βœ… | | πŸ”€ | 1.367s βŒ›οΈ | + +SessionManagerConfigurationHeadersTestCase: 2 tests were completed in 1.287 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatDefaultConfigurationHeadersAreSentWithRequest | βœ… | | πŸ”€ | 0.609s βŒ›οΈ | +| testThatEphemeralConfigurationHeadersAreSentWithRequest | βœ… | | πŸ”€ | 0.678s βŒ›οΈ | + +SessionTestCase: 29 tests were completed in 6.391999999999998 with 29 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testDefaultAcceptEncodingSupportsAppropriateEncodingsOnAppropriateSystems | βœ… | | πŸ”€ | 0.722s βŒ›οΈ | +| testDefaultUserAgentHeader | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testInitializerWithDefaultArguments | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testInitializerWithSpecifiedArguments | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testReleasingManagerWithPendingCanceledRequestDeinitializesSuccessfully | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testReleasingManagerWithPendingRequestDeinitializesSuccessfully | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testSetStartRequestsImmediatelyToFalseAndCancelledCallsResponseHandlers | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testSetStartRequestsImmediatelyToFalseAndCancelThenResumeRequestDoesntCreateTaskAndStaysCancelled | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testSetStartRequestsImmediatelyToFalseAndResumeRequest | βœ… | | πŸ”€ | 0.636s βŒ›οΈ | +| testSetStartRequestsImmediatelyToFalseAndResumeThenCancelRequestHasCorrectOutput | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatDataRequestWithInvalidURLStringThrowsResponseHandlerError | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatDownloadRequestWithInvalidURLStringThrowsResponseHandlerError | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testThatRequestAdapterErrorThrowsResponseHandlerError | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatRequestAdapterErrorThrowsResponseHandlerErrorWhenRequestIsRetried | βœ… | | πŸ”€ | 0.896s βŒ›οΈ | +| testThatSessionInitializerSucceedsWithDefaultArguments | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatSessionInitializerSucceedsWithSpecifiedArguments | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatSessionManagerCallsAdapterWhenRequestIsRetried | βœ… | | πŸ”€ | 0.997s βŒ›οΈ | +| testThatSessionManagerCallsRequestAdapterWhenCreatingDataRequest | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatSessionManagerCallsRequestAdapterWhenCreatingDownloadRequest | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testThatSessionManagerCallsRequestAdapterWhenCreatingUploadRequestWithData | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testThatSessionManagerCallsRequestAdapterWhenCreatingUploadRequestWithFile | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatSessionManagerCallsRequestAdapterWhenCreatingUploadRequestWithInputStream | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | +| testThatSessionManagerCallsRequestRetrierWhenDownloadInitiallyEncountersAdaptError | βœ… | | πŸ”€ | 0.629s βŒ›οΈ | +| testThatSessionManagerCallsRequestRetrierWhenRequestEncountersError | βœ… | | πŸ”€ | 1.097s βŒ›οΈ | +| testThatSessionManagerCallsRequestRetrierWhenRequestInitiallyEncountersAdaptError | βœ… | | πŸ”€ | 0.686s βŒ›οΈ | +| testThatSessionManagerCallsRequestRetrierWhenUploadInitiallyEncountersAdaptError | βœ… | | πŸ”€ | 0.629s βŒ›οΈ | +| testThatUploadDataRequestWithInvalidURLStringThrowsResponseHandlerError | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatUploadFileRequestWithInvalidURLStringThrowsResponseHandlerError | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testThatUploadStreamRequestWithInvalidURLStringThrowsResponseHandlerError | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | + +SortedKeysJSONParameterEncoderTests: 1 tests were completed in 0.004 with 1 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testTestJSONEncoderSortedKeysHasSortedKeys | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | + +StatusCodeValidationTestCase: 3 tests were completed in 0.5389999999999999 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatValidationForRequestWithAcceptableStatusCodeResponseSucceeds | βœ… | | πŸ”€ | 0.18s βŒ›οΈ | +| testThatValidationForRequestWithNoAcceptableStatusCodesFails | βœ… | | πŸ”€ | 0.18s βŒ›οΈ | +| testThatValidationForRequestWithUnacceptableStatusCodeResponseFails | βœ… | | πŸ”€ | 0.179s βŒ›οΈ | + +TLSEvaluationExpiredLeafCertificateTestCase: 14 tests were completed in 6.6690000000000005 with 14 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatExpiredCertificateRequestFailsWhenPinningAllCertificatesWithCertificateChainValidation | βœ… | | πŸ”€ | 0.58s βŒ›οΈ | +| testThatExpiredCertificateRequestFailsWhenPinningLeafCertificateWithCertificateChainValidation | βœ… | | πŸ”€ | 0.323s βŒ›οΈ | +| testThatExpiredCertificateRequestFailsWhenPinningLeafPublicKeyWithCertificateChainValidation | βœ… | | πŸ”€ | 0.318s βŒ›οΈ | +| testThatExpiredCertificateRequestFailsWithDefaultServerTrustPolicy | βœ… | | πŸ”€ | 0.322s βŒ›οΈ | +| testThatExpiredCertificateRequestFailsWithNoServerTrustPolicy | βœ… | | πŸ”€ | 0.329s βŒ›οΈ | +| testThatExpiredCertificateRequestFailsWithRevokedServerTrustPolicy | βœ… | | πŸ”€ | 0.319s βŒ›οΈ | +| testThatExpiredCertificateRequestSucceedsWhenDisablingEvaluation | βœ… | | πŸ”€ | 0.631s βŒ›οΈ | +| testThatExpiredCertificateRequestSucceedsWhenPinningIntermediateCACertificateWithoutCertificateChainOrHostValidation | βœ… | | πŸ”€ | 0.627s βŒ›οΈ | +| testThatExpiredCertificateRequestSucceedsWhenPinningIntermediateCAPublicKeyWithoutCertificateChainOrHostValidation | βœ… | | πŸ”€ | 0.626s βŒ›οΈ | +| testThatExpiredCertificateRequestSucceedsWhenPinningLeafCertificateWithoutCertificateChainOrHostValidation | βœ… | | πŸ”€ | 0.686s βŒ›οΈ | +| testThatExpiredCertificateRequestSucceedsWhenPinningLeafPublicKeyWithoutCertificateChainOrHostValidation | βœ… | | πŸ”€ | 0.626s βŒ›οΈ | +| testThatExpiredCertificateRequestSucceedsWhenPinningRootCACertificateWithoutCertificateChainValidation | βœ… | | πŸ”€ | 0.335s βŒ›οΈ | +| testThatExpiredCertificateRequestSucceedsWhenPinningRootCAPublicKeyWithoutCertificateChainValidation | βœ… | | πŸ”€ | 0.325s βŒ›οΈ | +| testThatRevokedCertificateRequestFailsWithRevokedServerTrustPolicy | βœ… | | πŸ”€ | 0.622s βŒ›οΈ | + +URLEncodedFormEncoderTests: 38 tests were completed in 0.12600000000000006 with 38 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testEncoderCanEncodeDictionary | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeDouble | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testEncoderCanEncodeFloat | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeInt16 | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeInt32 | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeInt64 | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeInt8 | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeUInt | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeUInt16 | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testEncoderCanEncodeUInt32 | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeUInt64 | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderCanEncodeUInt8 | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderThrowsErrorWhenAttemptingToEncodeNilInKeyedContainer | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testEncoderThrowsErrorWhenAttemptingToEncodeNilInUnkeyedContainer | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testStringWithThousandsOfChineseCharactersIsPercentEscaped | βœ… | | πŸ”€ | 0.011s βŒ›οΈ | +| testThatAmpersandsInKeysAndValuesArePercentEscaped | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatARootArrayCannotBeEncoded | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatARootValueCannotBeEncoded | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatArraysCanBeEncodedWithoutBrackets | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatBoolsCanBeLiteralEncoded | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatEncodableClassWithNoInheritanceCanBeEncoded | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatEncodableStructCanBeEncoded | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatEncodableSubclassCanBeEncoded | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatEscapedCharactersCanBeCustomized | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatIllegalASCIICharactersArePercentEscaped | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatManuallyEncodableStructCanBeEncoded | βœ… | | πŸ”€ | 0.005s βŒ›οΈ | +| testThatManuallyEncodableSubclassCanBeEncoded | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatNestedDictionariesHaveBracketedKeys | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatNonLatinCharactersArePercentEscaped | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatOptionalValuesCannotBeEncoded | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatPercentsInKeysAndValuesArePercentEscaped | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatPlusesInKeysAndValuesArePercentEscaped | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatQuestionMarksInKeysAndValuesAreNotPercentEscaped | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatReseredCharactersArePercentEscaped | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatSlashesInKeysAndValuesAreNotPercentEscaped | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatSpacesCanBeEncodedAsPluses | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatSpacesInKeysAndValuesArePercentEscaped | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatUnreservedCharactersAreNotPercentEscaped | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | + +URLEncodedFormParameterEncoderTests: 4 tests were completed in 0.011000000000000001 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatEncoderCanBeCustomized | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatQueryIsBodyEncodedAndProperContentTypeIsSetForPOSTRequest | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatQueryIsBodyEncodedButContentTypeIsNotSetWhenRequestAlreadyHasContentType | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatQueryIsInURLWhenDestinationIsURLAndMethodIsPOST | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | + +URLParameterEncodingTestCase: 36 tests were completed in 0.11400000000000007 with 36 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatIllegalASCIICharactersArePercentEscaped | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatReservedCharactersArePercentEscapedMinusQuestionMarkAndForwardSlash | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatReservedCharactersQuestionMarkAndForwardSlashAreNotPercentEscaped | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatUnreservedLowercaseCharactersAreNotPercentEscaped | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testThatUnreservedNumericCharactersAreNotPercentEscaped | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatUnreservedUppercaseCharactersAreNotPercentEscaped | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testThatURLEncodedInURLParameterEncodingEncodesPOSTParametersInURL | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatURLParameterEncodingEncodesGETParametersInURL | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testThatURLParameterEncodingEncodesPOSTParametersInHTTPBody | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeEmptyDictionaryParameter | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testURLParameterEncodeNilParameters | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testURLParameterEncodeOneStringKeyStringValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeOneStringKeyStringValueParameterAppendedToQuery | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringForRequestWithPrecomposedQuery | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringKeyArrayValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringKeyArrayValueParameterWithoutBrackets | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testURLParameterEncodeStringKeyBoolValueParameter | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testURLParameterEncodeStringKeyDictionaryValueParameter | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testURLParameterEncodeStringKeyDoubleValueParameter | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testURLParameterEncodeStringKeyIntegerValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringKeyNestedDictionaryArrayValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringKeyNestedDictionaryArrayValueParameterWithoutBrackets | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testURLParameterEncodeStringKeyNestedDictionaryValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringKeyNonLatinStringValueParameter | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testURLParameterEncodeStringKeyNSNumberBoolValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringKeyNSNumberIntegerValueParameter | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testURLParameterEncodeStringKeyPercentEncodedStringValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringWithAmpersandKeyStringWithAmpersandValueParameter | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testURLParameterEncodeStringWithPlusKeyStringWithPlusValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringWithPlusKeyStringWithPlusValueParameterForRequestWithPrecomposedQuery | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringWithQuestionMarkKeyStringWithQuestionMarkValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringWithSlashKeyStringWithQuestionMarkValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringWithSpaceKeyStringWithSpaceValueParameter | βœ… | | πŸ”€ | 0.003s βŒ›οΈ | +| testURLParameterEncodeStringWithThousandsOfChineseCharacters | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testURLParameterEncodeTwoStringKeyStringValueParameters | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | +| testURLParameterLiteralBoolEncodingWorksAndDoesNotAffectNumbers | βœ… | | πŸ”€ | 0.004s βŒ›οΈ | + +URLProtocolTestCase: 1 tests were completed in 0.636 with 1 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatURLProtocolReceivesRequestHeadersAndSessionConfigurationHeaders | βœ… | | πŸ”€ | 0.636s βŒ›οΈ | + +UploadDataInitializationTestCase: 2 tests were completed in 0.361 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testUploadClassMethodWithMethodURLAndData | βœ… | | πŸ”€ | 0.181s βŒ›οΈ | +| testUploadClassMethodWithMethodURLHeadersAndData | βœ… | | πŸ”€ | 0.18s βŒ›οΈ | + +UploadDataTestCase: 2 tests were completed in 0.405 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testUploadDataRequest | βœ… | | πŸ”€ | 0.183s βŒ›οΈ | +| testUploadDataRequestWithProgress | βœ… | | πŸ”€ | 0.222s βŒ›οΈ | + +UploadFileInitializationTestCase: 2 tests were completed in 0.479 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testUploadClassMethodWithMethodURLAndFile | βœ… | | πŸ”€ | 0.237s βŒ›οΈ | +| testUploadClassMethodWithMethodURLHeadersAndFile | βœ… | | πŸ”€ | 0.242s βŒ›οΈ | + +UploadMultipartFormDataTestCase: 8 tests were completed in 2.012 with 8 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThatUploadingMultipartFormDataAboveMemoryThresholdSetsContentTypeHeader | βœ… | | πŸ”€ | 0.196s βŒ›οΈ | +| testThatUploadingMultipartFormDataAboveMemoryThresholdStreamsFromDisk | βœ… | | πŸ”€ | 0.183s βŒ›οΈ | +| testThatUploadingMultipartFormDataBelowMemoryThresholdSetsContentTypeHeader | βœ… | | πŸ”€ | 0.183s βŒ›οΈ | +| testThatUploadingMultipartFormDataBelowMemoryThresholdStreamsFromMemory | βœ… | | πŸ”€ | 0.224s βŒ›οΈ | +| testThatUploadingMultipartFormDataSetsContentTypeHeader | βœ… | | πŸ”€ | 0.286s βŒ›οΈ | +| testThatUploadingMultipartFormDataSucceedsWithDefaultParameters | βœ… | | πŸ”€ | 0.28s βŒ›οΈ | +| testThatUploadingMultipartFormDataWhileStreamingFromDiskMonitorsProgress | βœ… | | πŸ”€ | 0.32s βŒ›οΈ | +| testThatUploadingMultipartFormDataWhileStreamingFromMemoryMonitorsProgress | βœ… | | πŸ”€ | 0.34s βŒ›οΈ | + +UploadStreamInitializationTestCase: 2 tests were completed in 0.653 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testUploadClassMethodWithMethodURLAndStream | βœ… | | πŸ”€ | 0.346s βŒ›οΈ | +| testUploadClassMethodWithMethodURLHeadersAndStream | βœ… | | πŸ”€ | 0.307s βŒ›οΈ | diff --git a/Tests/Assets/md/Kitura.md b/Tests/Assets/md/Kitura.md new file mode 100644 index 0000000..2b0a2f9 --- /dev/null +++ b/Tests/Assets/md/Kitura.md @@ -0,0 +1,360 @@ +MiscellaneousTests: 2 tests were completed in 0.095 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testHeaders | βœ… | | πŸ”€ | 0.095s βŒ›οΈ | +| testHeadersHelpers | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | + +TestBridgingHTTPStatusCode: 1 tests were completed in 0.126 with 1 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testSimpleResponse | βœ… | | πŸ”€ | 0.126s βŒ›οΈ | + +TestBridgingRequestError: 1 tests were completed in 0.053 with 1 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testRequestError | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | + +TestCodableRouter: 25 tests were completed in 36.36 with 25 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testBasicDelete | βœ… | | πŸ”€ | 0.158s βŒ›οΈ | +| testBasicDeleteSingle | βœ… | | πŸ”€ | 0.155s βŒ›οΈ | +| testBasicGetArray | βœ… | | πŸ”€ | 0.153s βŒ›οΈ | +| testBasicGetIdentifiersArray | βœ… | | πŸ”€ | 0.208s βŒ›οΈ | +| testBasicGetSingle | βœ… | | πŸ”€ | 0.16s βŒ›οΈ | +| testBasicGetSingleton | βœ… | | πŸ”€ | 0.158s βŒ›οΈ | +| testBasicPatch | βœ… | | πŸ”€ | 6.195s βŒ›οΈ | +| testBasicPost | βœ… | | πŸ”€ | 0.364s βŒ›οΈ | +| testBasicPostIdentifier | βœ… | | πŸ”€ | 0.163s βŒ›οΈ | +| testBasicPut | βœ… | | πŸ”€ | 6.194s βŒ›οΈ | +| testCodableDeleteQueryParameters | βœ… | | πŸ”€ | 0.291s βŒ›οΈ | +| testCodableGetArrayQueryParameters | βœ… | | πŸ”€ | 0.285s βŒ›οΈ | +| testCodableGetSingleQueryParameters | βœ… | | πŸ”€ | 0.292s βŒ›οΈ | +| testCodablePostSuccessStatuses | βœ… | | πŸ”€ | 0.158s βŒ›οΈ | +| testCodableRoutesWithBodyParsingFail | βœ… | | πŸ”€ | 4.194s βŒ›οΈ | +| testErrorOverridesBody | βœ… | | πŸ”€ | 8.488s βŒ›οΈ | +| testIdentifierNotExpected | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testIdentifierNotSupplied | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | +| testInvalidIdentifierSupplied | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testJoinPath | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testNoDataCustomStatus | βœ… | | πŸ”€ | 2.124s βŒ›οΈ | +| testNoDataDefaultStatus | βœ… | | πŸ”€ | 2.122s βŒ›οΈ | +| testPartialIdentifierSupplied | βœ… | | πŸ”€ | 0.054s βŒ›οΈ | +| testRouteParameters | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testRouteWithTrailingSlash | βœ… | | πŸ”€ | 4.238s βŒ›οΈ | + +TestContentType: 3 tests were completed in 0.0 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testFilename | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testInitialize | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testIsContentType | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | + +TestCookies: 5 tests were completed in 0.36 with 5 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testCookieFromServer | βœ… | | πŸ”€ | 0.111s βŒ›οΈ | +| testCookieToServerWithSemiColonSeparator | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | +| testCookieToServerWithSemiColonSpaceSeparator | βœ… | | πŸ”€ | 0.054s βŒ›οΈ | +| testCookieToServerWithSemiColonWhitespacesSeparator | βœ… | | πŸ”€ | 0.049s βŒ›οΈ | +| testNoCookies | βœ… | | πŸ”€ | 0.093s βŒ›οΈ | + +TestCustomCoders: 3 tests were completed in 0.46599999999999997 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testCustomCoder | βœ… | | πŸ”€ | 0.108s βŒ›οΈ | +| testCustomQueryEncoder | βœ… | | πŸ”€ | 0.253s βŒ›οΈ | +| testRawCustomCoder | βœ… | | πŸ”€ | 0.105s βŒ›οΈ | + +TestDecodingErrorExtension: 4 tests were completed in 0.0 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testMalformedJson | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testMissingRequiredKey | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testMissingValue | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testWrongType | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | + +TestErrors: 3 tests were completed in 0.153 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testInvalidEndpoint | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testInvalidHeader | βœ… | | πŸ”€ | 0.049s βŒ›οΈ | +| testInvalidMethod | βœ… | | πŸ”€ | 0.054s βŒ›οΈ | + +TestMediaType: 10 tests were completed in 0.0 with 10 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAllTextMediaTypeBuilder | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testAllTextSlashMediaTypeBuilder | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testHTMLMediaTypeBuilder | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testIncorrectTopLevelType | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testInvalidMediaType | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testMediaCaseInsensitive | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testPartsAllTextMediaTypeBuilder | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testPartsHTMLMediaTypeBuilder | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testPartsMediaCaseInsensitive | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testValidMediaType | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | + +TestMultiplicity: 4 tests were completed in 0.594 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testCombined | βœ… | | πŸ”€ | 0.148s βŒ›οΈ | +| testPlus | βœ… | | πŸ”€ | 0.151s βŒ›οΈ | +| testQuestion | βœ… | | πŸ”€ | 0.146s βŒ›οΈ | +| testStar | βœ… | | πŸ”€ | 0.149s βŒ›οΈ | + +TestRangeHeaderDataExtensions: 3 tests were completed in 0.012 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testPartialDataRead | βœ… | | πŸ”€ | 0.008s βŒ›οΈ | +| testPartialDataReadEntireFile | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testPartialDataReadWithErrorFileNotFound | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | + +TestRangeHeaderParser: 17 tests were completed in 0.001 with 17 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testIsBytesRangeHeader | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testParseString | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testReturnNilOnInvalidNonDigitsRanges | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testReturnNilOnInvalidRanges | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testReturnNilOnMalformedHeader | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldCapEndAtSize | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldCombineOverlappingRanges | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldCombineOverlappingRangesAndRetainOriginalOrder | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseNonBytesRange | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseNormalString | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseStringAskingForLastByte | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseStringWithBytesEqualZeroZero | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseStringWithMultipleRanges | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseStringWithOnlyEnd | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseStringWithOnlyStart | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseStringWithSomeInvalidRanges | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testShouldParseWithStartBytesEqualtToZero | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | + +TestRequests: 8 tests were completed in 0.612 with 8 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testCustomMiddlewareURLParameter | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testCustomMiddlewareURLParameterWithQueryParam | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testMultipleParametersMultipleHandlers | βœ… | | πŸ”€ | 0.098s βŒ›οΈ | +| testOneParameterMultipleHandlers | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | +| testParameterExit | βœ… | | πŸ”€ | 0.097s βŒ›οΈ | +| testParameters | βœ… | | πŸ”€ | 0.097s βŒ›οΈ | +| testQueryParameters | βœ… | | πŸ”€ | 0.111s βŒ›οΈ | +| testRouteParameters | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | + +TestResponse: 35 tests were completed in 7.216 with 35 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAcceptEncodingTypes | βœ… | | πŸ”€ | 0.1s βŒ›οΈ | +| testAcceptTypes | βœ… | | πŸ”€ | 0.105s βŒ›οΈ | +| testChangeStatusCodeOnInvokedSend | βœ… | | πŸ”€ | 0.1s βŒ›οΈ | +| testEmptyHandler | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testErrorHandler | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testFormat | βœ… | | πŸ”€ | 0.15s βŒ›οΈ | +| testHeaderModifiers | βœ… | | πŸ”€ | 0.058s βŒ›οΈ | +| testJsonp | βœ… | | πŸ”€ | 0.25s βŒ›οΈ | +| testLargeGet | βœ… | | πŸ”€ | 0.089s βŒ›οΈ | +| testLargePost | βœ… | | πŸ”€ | 2.146s βŒ›οΈ | +| testLifecycle | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testLink | βœ… | | πŸ”€ | 0.104s βŒ›οΈ | +| testMultipartFormParsing | βœ… | | πŸ”€ | 0.207s βŒ›οΈ | +| testOptionalStringNilResponse | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | +| testOptionalStringResponse | βœ… | | πŸ”€ | 0.055s βŒ›οΈ | +| testParameters | βœ… | | πŸ”€ | 0.048s βŒ›οΈ | +| testParametersPercent20InPath | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testParametersPercent20InQuery | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testParametersPercentageEncoding | βœ… | | πŸ”€ | 0.046s βŒ›οΈ | +| testParametersPlusInPath | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testParametersPlusInQuery | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testPostJSONRequest | βœ… | | πŸ”€ | 0.054s βŒ›οΈ | +| testPostRequest | βœ… | | πŸ”€ | 0.054s βŒ›οΈ | +| testPostRequestTheHardWay | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testPostRequestUrlEncoded | βœ… | | πŸ”€ | 0.157s βŒ›οΈ | +| testPostRequestWithDoubleBodyParser | βœ… | | πŸ”€ | 0.048s βŒ›οΈ | +| testRawDataPost | βœ… | | πŸ”€ | 2.061s βŒ›οΈ | +| testRedirect | βœ… | | πŸ”€ | 0.094s βŒ›οΈ | +| testResponseNoEndOrNext | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | +| testRouteFunc | βœ… | | πŸ”€ | 0.107s βŒ›οΈ | +| testSend | βœ… | | πŸ”€ | 0.37s βŒ›οΈ | +| testSendAfterEnd | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testSimpleResponse | βœ… | | πŸ”€ | 0.049s βŒ›οΈ | +| testSubdomains | βœ… | | πŸ”€ | 0.155s βŒ›οΈ | +| testUserInfo | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | + +TestRouteRegex: 7 tests were completed in 2.7859999999999996 with 7 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testBuildRegexFromPattern | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testCustomMatchesWithModifiers | βœ… | | πŸ”€ | 1.102s βŒ›οΈ | +| testRouteWithPercentEncoding | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testSimpleCustomMatches | βœ… | | πŸ”€ | 0.199s βŒ›οΈ | +| testSimpleMatches | βœ… | | πŸ”€ | 0.254s βŒ›οΈ | +| testSimpleModifiers | βœ… | | πŸ”€ | 0.786s βŒ›οΈ | +| testSimplePaths | βœ… | | πŸ”€ | 0.393s βŒ›οΈ | + +TestRouterHTTPVerbsGenerated: 4 tests were completed in 0.004 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testFirstTypeVerbsAdded | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testFourthTypeVerbsAdded | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testSecondTypeVerbsAdded | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testThirdTypeVerbsAdded | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | + +TestServer: 4 tests were completed in 20.392 with 2 passed, 2 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testServerFail | βœ… | | πŸ”€ | 0.04s βŒ›οΈ | +| testServerRestart | βœ… | | πŸ”€ | 0.175s βŒ›οΈ | +| testServerRun | | ❌ | πŸ”€ | 10.169s βŒ›οΈ | +| testServerStartStop | | ❌ | πŸ”€ | 10.008s βŒ›οΈ | + +TestStack: 2 tests were completed in 0.0 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testEmpty | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testPushPop | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | + +TestStaticFileServer: 30 tests were completed in 2.3390000000000004 with 30 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAbsolutePathFunction | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testAbsoluteRootPath | βœ… | | πŸ”€ | 0.0s βŒ›οΈ | +| testDataIsNotCorrupted | βœ… | | πŸ”€ | 0.195s βŒ›οΈ | +| testFileServer | βœ… | | πŸ”€ | 0.496s βŒ›οΈ | +| testGetDefaultResponse | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testGetKituraResource | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testGetMissingKituraResource | βœ… | | πŸ”€ | 0.056s βŒ›οΈ | +| testGetTraversedFile | βœ… | | πŸ”€ | 0.047s βŒ›οΈ | +| testGetTraversedFileKituraResource | βœ… | | πŸ”€ | 0.047s βŒ›οΈ | +| testGetWithSpecialCharacters | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testGetWithSpecialCharactersEncoded | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testGetWithWhiteSpaces | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testParameterizedSubRouterSubFolderStaticFileServer | βœ… | | πŸ”€ | 0.089s βŒ›οΈ | +| testParameterizedSubRouterSubFolderStaticFileServerRedirect | βœ… | | πŸ”€ | 0.118s βŒ›οΈ | +| testRangeRequestIsIgnoredOnNonGetMethod | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testRangeRequestIsIgnoredOnOptionOff | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | +| testRangeRequests | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testRangeRequestsWithLargeLastBytePos | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testRangeRequestsWithMultipleRanges | βœ… | | πŸ”€ | 0.056s βŒ›οΈ | +| testRangeRequestWithIfRangeHeaderAsLastModified | βœ… | | πŸ”€ | 0.099s βŒ›οΈ | +| testRangeRequestWithIfRangeHeaderAsOldLastModified | βœ… | | πŸ”€ | 0.05s βŒ›οΈ | +| testRangeRequestWithIfRangeHeaderWithETag | βœ… | | πŸ”€ | 0.117s βŒ›οΈ | +| testRangeRequestWithIfRangeHeaderWithOldETag | βœ… | | πŸ”€ | 0.055s βŒ›οΈ | +| testRangeRequestWithNotSatisfiableRange | βœ… | | πŸ”€ | 0.057s βŒ›οΈ | +| testRangeRequestWithSintacticallyInvalidRange | βœ… | | πŸ”€ | 0.067s βŒ›οΈ | +| testSubRouterStaticFileServer | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testSubRouterStaticFileServerRedirect | βœ… | | πŸ”€ | 0.085s βŒ›οΈ | +| testSubRouterSubFolderStaticFileServer | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testSubRouterSubFolderStaticFileServerRedirect | βœ… | | πŸ”€ | 0.089s βŒ›οΈ | +| testWelcomePageCanBeDisabled | βœ… | | πŸ”€ | 0.049s βŒ›οΈ | + +TestSubrouter: 5 tests were completed in 0.502 with 5 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testExternSub | βœ… | | πŸ”€ | 0.1s βŒ›οΈ | +| testMergeParams | βœ… | | πŸ”€ | 0.155s βŒ›οΈ | +| testMultipleMiddleware | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testSimpleSub | βœ… | | πŸ”€ | 0.097s βŒ›οΈ | +| testSubSubs | βœ… | | πŸ”€ | 0.099s βŒ›οΈ | + +TestSwaggerGeneration: 9 tests were completed in 0.99 with 9 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testArrayReturnTypes | βœ… | | πŸ”€ | 0.101s βŒ›οΈ | +| testBasePath | βœ… | | πŸ”€ | 0.095s βŒ›οΈ | +| testInfo | βœ… | | πŸ”€ | 0.095s βŒ›οΈ | +| testInputTypesModelled | βœ… | | πŸ”€ | 0.172s βŒ›οΈ | +| testNestedTypesModelled | βœ… | | πŸ”€ | 0.1s βŒ›οΈ | +| testSwaggerContent | βœ… | | πŸ”€ | 0.1s βŒ›οΈ | +| testSwaggerDefinitions | βœ… | | πŸ”€ | 0.102s βŒ›οΈ | +| testSwaggerQueryParams | βœ… | | πŸ”€ | 0.104s βŒ›οΈ | +| testSwaggerVersion | βœ… | | πŸ”€ | 0.121s βŒ›οΈ | + +TestTemplateEngine: 23 tests were completed in 0.37999999999999995 with 23 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAddWithFileExtensions | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testAddWithFileExtensionsWithoutTheDefaultOne | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testCodableAddWithFileExtensions | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testCodableAddWithFileExtensionsWithoutTheDefaultOne | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testCodableRender | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testCodableRenderWithExtensionAndWithoutDefaultTemplateEngine | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testCodableRenderWithExtensionAndWithoutDefaultTemplateEngineAfterSettingViewsPath | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testCodableRenderWithOptionsWithServer | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testCodableRenderWithServer | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testCodableRenderWithServerAndSubRouter | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | +| testCodableRenderWithTuple | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testEmptyTemplateName | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testEmptyTemplateNameCodable | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testMissingExtension | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testMissingExtensionCodable | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testNoDefaultEngine | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testNoDefaultEngineCodable | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRender | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRenderWithExtensionAndWithoutDefaultTemplateEngine | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRenderWithExtensionAndWithoutDefaultTemplateEngineAfterSettingViewsPath | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRenderWithOptionsWithServer | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testRenderWithServer | βœ… | | πŸ”€ | 0.054s βŒ›οΈ | +| testRenderWithServerAndSubRouter | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | + +TestTypeSafeMiddleware: 33 tests were completed in 28.692999999999994 with 33 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testCustomCoder | βœ… | | πŸ”€ | 4.24s βŒ›οΈ | +| testCustomCoderGet | βœ… | | πŸ”€ | 0.294s βŒ›οΈ | +| testMiddlewareLogging | βœ… | | πŸ”€ | 0.059s βŒ›οΈ | +| testMultipleMiddlewareDelete | βœ… | | πŸ”€ | 0.163s βŒ›οΈ | +| testMultipleMiddlewareDeleteIdentifier | βœ… | | πŸ”€ | 0.164s βŒ›οΈ | +| testMultipleMiddlewareDeleteOptionalParameters | βœ… | | πŸ”€ | 0.115s βŒ›οΈ | +| testMultipleMiddlewareDeleteParameters | βœ… | | πŸ”€ | 0.159s βŒ›οΈ | +| testMultipleMiddlewareGetArray | βœ… | | πŸ”€ | 0.153s βŒ›οΈ | +| testMultipleMiddlewareGetArrayOptionalParameters | βœ… | | πŸ”€ | 0.163s βŒ›οΈ | +| testMultipleMiddlewareGetArrayParameters | βœ… | | πŸ”€ | 0.158s βŒ›οΈ | +| testMultipleMiddlewareGetIdentifier | βœ… | | πŸ”€ | 0.156s βŒ›οΈ | +| testMultipleMiddlewareGetIdentifierCodableArray | βœ… | | πŸ”€ | 0.153s βŒ›οΈ | +| testMultipleMiddlewareGetSingleton | βœ… | | πŸ”€ | 0.155s βŒ›οΈ | +| testMultipleMiddlewareGetSingletonParameters | βœ… | | πŸ”€ | 0.161s βŒ›οΈ | +| testMultipleMiddlewarePatch | βœ… | | πŸ”€ | 6.187s βŒ›οΈ | +| testMultipleMiddlewarePost | βœ… | | πŸ”€ | 0.159s βŒ›οΈ | +| testMultipleMiddlewarePostIdentifier | βœ… | | πŸ”€ | 0.156s βŒ›οΈ | +| testMultipleMiddlewarePut | βœ… | | πŸ”€ | 6.181s βŒ›οΈ | +| testSingleMiddlewareDelete | βœ… | | πŸ”€ | 0.113s βŒ›οΈ | +| testSingleMiddlewareDeleteIdentifier | βœ… | | πŸ”€ | 0.102s βŒ›οΈ | +| testSingleMiddlewareDeleteOptionalParameters | βœ… | | πŸ”€ | 0.113s βŒ›οΈ | +| testSingleMiddlewareDeleteParameters | βœ… | | πŸ”€ | 0.112s βŒ›οΈ | +| testSingleMiddlewareGetArray | βœ… | | πŸ”€ | 0.104s βŒ›οΈ | +| testSingleMiddlewareGetArrayOptionalParameters | βœ… | | πŸ”€ | 0.154s βŒ›οΈ | +| testSingleMiddlewareGetArrayParameters | βœ… | | πŸ”€ | 0.112s βŒ›οΈ | +| testSingleMiddlewareGetIdentifier | βœ… | | πŸ”€ | 0.104s βŒ›οΈ | +| testSingleMiddlewareGetIdentifierCodableArray | βœ… | | πŸ”€ | 0.106s βŒ›οΈ | +| testSingleMiddlewareGetSingleton | βœ… | | πŸ”€ | 0.104s βŒ›οΈ | +| testSingleMiddlewareGetSingletonParameters | βœ… | | πŸ”€ | 0.115s βŒ›οΈ | +| testSingleMiddlewarePatch | βœ… | | πŸ”€ | 4.127s βŒ›οΈ | +| testSingleMiddlewarePost | βœ… | | πŸ”€ | 0.11s βŒ›οΈ | +| testSingleMiddlewarePostIdentifier | βœ… | | πŸ”€ | 0.108s βŒ›οΈ | +| testSingleMiddlewarePut | βœ… | | πŸ”€ | 4.133s βŒ›οΈ | diff --git a/Tests/Assets/md/PromiseFailure.md b/Tests/Assets/md/PromiseFailure.md new file mode 100644 index 0000000..5064a05 --- /dev/null +++ b/Tests/Assets/md/PromiseFailure.md @@ -0,0 +1,120 @@ +ExecutionContextTests: 6 tests were completed in 18.541 with 6 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testConcurrency | βœ… | | πŸ”€ | 15.354s βŒ›οΈ | +| testInvalidatableQueueSupportsNonMainQueues | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testInvalidatedInvalidatableQueue | βœ… | | πŸ”€ | 0.102s βŒ›οΈ | +| testNonInvalidatedInvalidatableQueue | βœ… | | πŸ”€ | 0.007s βŒ›οΈ | +| testTapContinuesToFireInvalidatableQueue | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testThreads | βœ… | | πŸ”€ | 3.075s βŒ›οΈ | + +PromiseAllTests: 5 tests were completed in 0.271 with 5 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAll | βœ… | | πŸ”€ | 0.108s βŒ›οΈ | +| testAllWithEmptyArray | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testAllWithPreFulfilledValues | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testAllWithRejectionHappeningFirst | βœ… | | πŸ”€ | 0.058s βŒ›οΈ | +| testAllWithRejectionHappeningLast | βœ… | | πŸ”€ | 0.103s βŒ›οΈ | + +PromiseAlwaysTests: 4 tests were completed in 1.024 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAlways | βœ… | | πŸ”€ | 0.507s βŒ›οΈ | +| testAlwaysInstantFulfill | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testAlwaysInstantReject | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testAlwaysRejects | βœ… | | πŸ”€ | 0.515s βŒ›οΈ | + +PromiseDelayTests: 4 tests were completed in 0.9360000000000002 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testDelay | βœ… | | πŸ”€ | 0.202s βŒ›οΈ | +| testTimeoutFunctionFails | βœ… | | πŸ”€ | 0.519s βŒ›οΈ | +| testTimeoutFunctionSucceeds | βœ… | | πŸ”€ | 0.012s βŒ›οΈ | +| testTimeoutPromise | βœ… | | πŸ”€ | 0.203s βŒ›οΈ | + +PromiseEnsureTests: 3 tests were completed in 0.003 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testEnsureOnlyCalledOnSucceess | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testEnsureRejects | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testEnsureSucceeds | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | + +PromiseKickoffTests: 3 tests were completed in 0.104 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testFailingKickoff | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testKickoff | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testPromiseKickoff | βœ… | | πŸ”€ | 0.102s βŒ›οΈ | + +PromiseRaceTests: 4 tests were completed in 0.111 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testInstantReject | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testInstantResolve | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRace | βœ… | | πŸ”€ | 0.056s βŒ›οΈ | +| testRaceFailure | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | + +PromiseRecoverTests: 6 tests were completed in 0.423 with 6 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testIgnoreRecover | βœ… | | πŸ”€ | 0.107s βŒ›οΈ | +| testIgnoreRecoverInstant | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRecover | βœ… | | πŸ”€ | 0.105s βŒ›οΈ | +| testRecoverInstant | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRecoverWithThrowingFunction | βœ… | | πŸ”€ | 0.106s βŒ›οΈ | +| testRecoverWithThrowingFunctionError | βœ… | | πŸ”€ | 0.103s βŒ›οΈ | + +PromiseRetryTests: 3 tests were completed in 0.005 with 3 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testRetry | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testRetryWithInstantSuccess | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRetryWithNeverSuccess | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | + +PromiseTests: 17 tests were completed in 0.503 with 16 passed, 1 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAsync | βœ… | | πŸ”€ | 0.056s βŒ›οΈ | +| testAsyncRejection | βœ… | | πŸ”€ | 0.052s βŒ›οΈ | +| testAsyncThrowing | βœ… | | πŸ”€ | 0.002s βŒ›οΈ | +| testDoubleReject | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testDoubleResolve | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testFlatMap | βœ… | | πŸ”€ | 0.108s βŒ›οΈ | +| testFulfilled | βœ… | | πŸ”€ | 0.053s βŒ›οΈ | +| testMap | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testPending | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRejected | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testRejectedAfterFulfilled | βœ… | | πŸ”€ | 0.051s βŒ›οΈ | +| testRejectThenResolve | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testResolveThenReject | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testThen | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testThenWhenPending | βœ… | | πŸ”€ | 0.054s βŒ›οΈ | +| testTrailingClosuresCompile | βœ… | | πŸ”€ | 0.107s βŒ›οΈ | +| testZalgoContained | | ❌ | πŸ”€ | 0.012s βŒ›οΈ | + +PromiseThrowsTests: 4 tests were completed in 0.004 with 4 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testThrowsInFlatmapping | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testThrowsInFlatmappingWithError | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testThrowsInMapping | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testThrowsInMappingWithError | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | + +PromiseZipTests: 2 tests were completed in 0.007 with 2 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testMultipleParameters | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testZipping2 | βœ… | | πŸ”€ | 0.006s βŒ›οΈ | diff --git a/Tests/Assets/md/PromiseUnexpectedFailure.md b/Tests/Assets/md/PromiseUnexpectedFailure.md new file mode 100644 index 0000000..28b4586 --- /dev/null +++ b/Tests/Assets/md/PromiseUnexpectedFailure.md @@ -0,0 +1,5 @@ +PromiseTests: 1 tests were completed in 0.021 with 0 passed, 1 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testUnexpected | | ❌ | πŸ”€ | 0.021s βŒ›οΈ | diff --git a/Tests/Assets/md/Shell.md b/Tests/Assets/md/Shell.md new file mode 100644 index 0000000..798f730 --- /dev/null +++ b/Tests/Assets/md/Shell.md @@ -0,0 +1,10 @@ +ShellTests: 6 tests were completed in 2.497 with 6 passed, 0 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAsyncRun | βœ… | | πŸ”€ | 2.172s βŒ›οΈ | +| testEnvironment | βœ… | | πŸ”€ | 0.065s βŒ›οΈ | +| testError | βœ… | | πŸ”€ | 0.065s βŒ›οΈ | +| testErrorHandler | βœ… | | πŸ”€ | 0.066s βŒ›οΈ | +| testOutput | βœ… | | πŸ”€ | 0.065s βŒ›οΈ | +| testOutputHandler | βœ… | | πŸ”€ | 0.064s βŒ›οΈ | diff --git a/Tests/Assets/md/ShellFailure.md b/Tests/Assets/md/ShellFailure.md new file mode 100644 index 0000000..52177ff --- /dev/null +++ b/Tests/Assets/md/ShellFailure.md @@ -0,0 +1,11 @@ +ShellTests: 7 tests were completed in 2.532 with 4 passed, 3 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testAsyncRun | βœ… | | πŸ”€ | 2.143s βŒ›οΈ | +| testEnvironment | | ❌ | πŸ”€ | 0.067s βŒ›οΈ | +| testError | βœ… | | πŸ”€ | 0.064s βŒ›οΈ | +| testErrorHandler | βœ… | | πŸ”€ | 0.064s βŒ›οΈ | +| testOutput | | ❌ | πŸ”€ | 0.064s βŒ›οΈ | +| testOutputHandler | βœ… | | πŸ”€ | 0.064s βŒ›οΈ | +| testThrow | | ❌ | πŸ”€ | 0.066s βŒ›οΈ | diff --git a/Tests/Assets/md/ShellOutFailure.md b/Tests/Assets/md/ShellOutFailure.md new file mode 100644 index 0000000..4bb33eb --- /dev/null +++ b/Tests/Assets/md/ShellOutFailure.md @@ -0,0 +1,18 @@ +ShellOutTests: 14 tests were completed in 6.191999999999998 with 11 passed, 3 failed and 0 skipped. + +| Test case | Passed | Failed | Skipped | Time | +| :--- | ---: | ---: | ---: | ---: | +| testCapturingErrorWithHandle | βœ… | | πŸ”€ | 0.269s βŒ›οΈ | +| testCapturingOutputWithHandle | βœ… | | πŸ”€ | 0.185s βŒ›οΈ | +| testErrorDescription | βœ… | | πŸ”€ | 0.001s βŒ›οΈ | +| testGitCommands | βœ… | | πŸ”€ | 1.833s βŒ›οΈ | +| testSeriesOfCommands | | ❌ | πŸ”€ | 0.169s βŒ›οΈ | +| testSeriesOfCommandsAtPath | βœ… | | πŸ”€ | 0.345s βŒ›οΈ | +| testSingleCommandAtPath | | ❌ | πŸ”€ | 0.336s βŒ›οΈ | +| testSingleCommandAtPathContainingSpace | βœ… | | πŸ”€ | 0.525s βŒ›οΈ | +| testSingleCommandAtPathContainingTilde | βœ… | | πŸ”€ | 0.165s βŒ›οΈ | +| testSwiftPackageManagerCommands | βœ… | | πŸ”€ | 1.665s βŒ›οΈ | +| testThrowingError | βœ… | | πŸ”€ | 0.188s βŒ›οΈ | +| testWithArguments | | ❌ | πŸ”€ | 0.18s βŒ›οΈ | +| testWithInlineArguments | βœ… | | πŸ”€ | 0.159s βŒ›οΈ | +| testWithoutArguments | βœ… | | πŸ”€ | 0.172s βŒ›οΈ | diff --git a/Tests/Assets/Alamofire.tests b/Tests/Assets/tests/Alamofire.tests similarity index 100% rename from Tests/Assets/Alamofire.tests rename to Tests/Assets/tests/Alamofire.tests diff --git a/Tests/Assets/Kitura.tests b/Tests/Assets/tests/Kitura.tests similarity index 100% rename from Tests/Assets/Kitura.tests rename to Tests/Assets/tests/Kitura.tests diff --git a/Tests/Assets/Promise.tests b/Tests/Assets/tests/Promise.tests similarity index 100% rename from Tests/Assets/Promise.tests rename to Tests/Assets/tests/Promise.tests diff --git a/Tests/Assets/PromiseFailure.tests b/Tests/Assets/tests/PromiseFailure.tests similarity index 100% rename from Tests/Assets/PromiseFailure.tests rename to Tests/Assets/tests/PromiseFailure.tests diff --git a/Tests/Assets/PromiseUnexpectedFailure.tests b/Tests/Assets/tests/PromiseUnexpectedFailure.tests similarity index 100% rename from Tests/Assets/PromiseUnexpectedFailure.tests rename to Tests/Assets/tests/PromiseUnexpectedFailure.tests diff --git a/Tests/Assets/Shell.tests b/Tests/Assets/tests/Shell.tests similarity index 100% rename from Tests/Assets/Shell.tests rename to Tests/Assets/tests/Shell.tests diff --git a/Tests/Assets/ShellFailure.tests b/Tests/Assets/tests/ShellFailure.tests similarity index 100% rename from Tests/Assets/ShellFailure.tests rename to Tests/Assets/tests/ShellFailure.tests diff --git a/Tests/Assets/ShellOutFailure.tests b/Tests/Assets/tests/ShellOutFailure.tests similarity index 100% rename from Tests/Assets/ShellOutFailure.tests rename to Tests/Assets/tests/ShellOutFailure.tests diff --git a/Tests/Assets/xml/Alamofire.xml b/Tests/Assets/xml/Alamofire.xml new file mode 100644 index 0000000..7fed57e --- /dev/null +++ b/Tests/Assets/xml/Alamofire.xml @@ -0,0 +1,593 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Assets/xml/Kitura.xml b/Tests/Assets/xml/Kitura.xml new file mode 100644 index 0000000..6c7d7e0 --- /dev/null +++ b/Tests/Assets/xml/Kitura.xml @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +failed - Error code: -9992(0x-2708), Address already in use/Users/tib/Downloads/Kitura-master/Tests/KituraTests/TestServer.swift:144: error: -[KituraTests.TestServer testServerRun] : Asynchronous wait failed: Exceeded timeout of 10 seconds, with unfulfilled expectations: "FastCGIServer started()"./Users/tib/Downloads/Kitura-master/Tests/KituraTests/TestServer.swift:146: error: -[KituraTests.TestServer testServerRun] : XCTAssertNil failed: "Error Domain=com.apple.XCTestErrorDomain Code=0 "(null)"" + + + + +failed - Error code: -9992(0x-2708), Address already in use/Users/tib/Downloads/Kitura-master/Tests/KituraTests/TestServer.swift:131: error: -[KituraTests.TestServer testServerStartStop] : Asynchronous wait failed: Exceeded timeout of 10 seconds, with unfulfilled expectations: "FastCGIServer started()", "FastCGIServer stopped()"./Users/tib/Downloads/Kitura-master/Tests/KituraTests/TestServer.swift:132: error: -[KituraTests.TestServer testServerStartStop] : XCTAssertNil failed: "Error Domain=com.apple.XCTestErrorDomain Code=0 "(null)"" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Assets/xml/PromiseFailure.xml b/Tests/Assets/xml/PromiseFailure.xml new file mode 100644 index 0000000..7f9c6f5 --- /dev/null +++ b/Tests/Assets/xml/PromiseFailure.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +XCTAssertTrue failed + + + + + + + + + + + + + + diff --git a/Tests/Assets/xml/PromiseUnexpectedFailure.xml b/Tests/Assets/xml/PromiseUnexpectedFailure.xml new file mode 100644 index 0000000..951d94b --- /dev/null +++ b/Tests/Assets/xml/PromiseUnexpectedFailure.xml @@ -0,0 +1,10 @@ + + + + + +failed: caught error: The operation couldn’t be completed. (PromiseTests.WrenchError error 1.) + + + + diff --git a/Tests/Assets/xml/Shell.xml b/Tests/Assets/xml/Shell.xml new file mode 100644 index 0000000..c2d5551 --- /dev/null +++ b/Tests/Assets/xml/Shell.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Tests/Assets/xml/ShellFailure.xml b/Tests/Assets/xml/ShellFailure.xml new file mode 100644 index 0000000..8dd7406 --- /dev/null +++ b/Tests/Assets/xml/ShellFailure.xml @@ -0,0 +1,24 @@ + + + + + + +XCTAssertEqual failed: ("Custom bad env variable") is not equal to ("Custom env variable") - Invalid output `Custom bad env variable`, expected `Custom env variable`. + + + + + + +XCTAssertEqual failed: ("Hello world!") is not equal to ("Hello outside world!") - Invalid output `Hello world!`, expected `Hello outside world!`. + + + + + +failed: caught error: The operation couldn’t be completed. (Shell.ShellError error 0.) + + + + diff --git a/Tests/Assets/xml/ShellOutFailure.xml b/Tests/Assets/xml/ShellOutFailure.xml new file mode 100644 index 0000000..3e3c615 --- /dev/null +++ b/Tests/Assets/xml/ShellOutFailure.xml @@ -0,0 +1,31 @@ + + + + + + + + + +XCTAssertEqual failed: ("Helloworld") is not equal to ("Hellowdorld") + + + + + +XCTAssertEqual failed: ("Hello") is not equal to ("Heallo") + + + + + + + + +XCTAssertEqual failed: ("Hello world") is not equal to ("Hello worldd") + + + + + + diff --git a/Tests/TestifySDKTests/TestifyJunitTests.swift b/Tests/TestifySDKTests/TestifyJunitTests.swift new file mode 100644 index 0000000..198add6 --- /dev/null +++ b/Tests/TestifySDKTests/TestifyJunitTests.swift @@ -0,0 +1,87 @@ +import XCTest +@testable import TestifySDK + +final class TestifyJunitTests: XCTestCase { + + func testTests() throws { + let testFiles = [ + "PromiseUnexpectedFailure", + "PromiseFailure", + "ShellOutFailure", + "Shell", + "ShellFailure", + "Alamofire", + "Kitura", + ] + + let packageRootPath = URL(fileURLWithPath: #file) + .pathComponents + .prefix(while: { $0 != "Tests" }) + .joined(separator: "/") + .dropFirst() + + let assetsUrl = URL(fileURLWithPath: String(packageRootPath)).appendingPathComponent("Tests") + .appendingPathComponent("Assets") + let decoder = RawTestResultDecoder() + + for file in testFiles { + let testUrl = assetsUrl.appendingPathComponent("/tests/" + file) + .appendingPathExtension("tests") + let xmlUrl = assetsUrl.appendingPathComponent("/xml/" + file) + .appendingPathExtension("xml") + + let testData = try Data(contentsOf: testUrl) + guard let testOutput = String(data: testData, encoding: .utf8) else { + return XCTFail("Could not decode test data.") + } + + let suite = try decoder.decode(testOutput) + let xmlData = try Data(contentsOf: xmlUrl) + let xmlParser = XMLParser(data: xmlData) + let parser = SuiteXmlParser() + xmlParser.delegate = parser + xmlParser.parse() + + XCTAssertTrue(self.checkNumbers(suite, parser), "Invalid numbers count for \(file).") + } + } + + //@TODO: is there a better way to check this ? + func checkNumbers(_ suite: TestSuite, _ parser: SuiteXmlParser) -> Bool { + let suites: [TestSuite] = suite.children.reduce([]) { $0 + $1.children } + var allTests = 0 + var allFails = 0 + for suite in suites { + let tests = suite.cases.count + let failureCount = suite.cases.reduce(0) { $0 + ($1.outcome == .failure ? 1 : 0) } + allTests += tests + allFails += failureCount + } + return suites.count == parser.suites && + allTests == parser.tests && + allFails == parser.fails + } + + class SuiteXmlParser : NSObject, XMLParserDelegate { + var suites = 0 + var tests = 0 + var fails = 0 + + func parser( + _ parser: XMLParser, + didStartElement elementName: String, + namespaceURI: String?, + qualifiedName qName: String?, + attributes attributeDict: [String : String] = [:] + ) { + if (elementName=="testsuite") { + suites += 1 + } else if (elementName=="testcase") { + tests += 1 + } else if (elementName=="failure") { + fails += 1 + } + } + } + +} diff --git a/Tests/TestifySDKTests/TestifyMarkdownTests.swift b/Tests/TestifySDKTests/TestifyMarkdownTests.swift new file mode 100644 index 0000000..54ce1e0 --- /dev/null +++ b/Tests/TestifySDKTests/TestifyMarkdownTests.swift @@ -0,0 +1,84 @@ +import XCTest +@testable import TestifySDK + +final class TestifyMarkdownTests: XCTestCase { + + func testTests() throws { + + let testFiles = [ + "PromiseUnexpectedFailure", + "PromiseFailure", + "ShellOutFailure", + "Shell", + "ShellFailure", + "Alamofire", + "Kitura", + ] + + let packageRootPath = URL(fileURLWithPath: #file) + .pathComponents + .prefix(while: { $0 != "Tests" }) + .joined(separator: "/") + .dropFirst() + + let assetsUrl = URL(fileURLWithPath: String(packageRootPath)).appendingPathComponent("Tests") + .appendingPathComponent("Assets") + let decoder = RawTestResultDecoder() + + for file in testFiles { + let testUrl = assetsUrl.appendingPathComponent("/tests/" + file) + .appendingPathExtension("tests") + let mdUrl = assetsUrl.appendingPathComponent("/md/" + file) + .appendingPathExtension("md") + + let testData = try Data(contentsOf: testUrl) + guard let testOutput = String(data: testData, encoding: .utf8) else { + return XCTFail("Could not decode test data.") + } + let suite = try decoder.decode(testOutput) + + let resultData = try Data(contentsOf: mdUrl) + guard let testMdOutput = String(data: resultData, encoding: .utf8) else { + return XCTFail("Could not decode test data.") + } + + let filtered = testMdOutput.split(separator: "\n").map({ String($0) }).filter { + $0.contains("tests were completed") && + $0.contains("passed") && + $0.contains("failed") + } + + XCTAssertTrue(self.checkNumbers(suite, filtered), "Invalid numbers count for \(file).") + } + } + + //@TODO: is there a better way to check this ? + func checkNumbers(_ suite: TestSuite, _ filtered: [String]) -> Bool { + var mdAllTests = 0 + var mdAllFails = 0 + for item in filtered { + + let tests = Int(item.components(separatedBy: " tests were completed in ").filter { $0.contains(": ") }[0] + .components(separatedBy: ": ")[1]) + let fails = Int(item.components(separatedBy: " passed, ").filter { $0.contains("failed and") }[0] + .components(separatedBy: " failed ")[0]) + mdAllTests += tests ?? 0 + mdAllFails += fails ?? 0 + } + + let suites: [TestSuite] = suite.children.reduce([]) { $0 + $1.children } + var allTests = 0 + var allFails = 0 + for suite in suites { + let tests = suite.cases.count + let failureCount = suite.cases.reduce(0) { $0 + ($1.outcome == .failure ? 1 : 0) } + allTests += tests + allFails += failureCount + } + + return suites.count == filtered.count && + allTests == mdAllTests && + allFails == mdAllFails + } + +} diff --git a/Tests/TestifyTests/TestifyTests.swift b/Tests/TestifySDKTests/TestifySDKTests.swift similarity index 87% rename from Tests/TestifyTests/TestifyTests.swift rename to Tests/TestifySDKTests/TestifySDKTests.swift index f30bbd0..eb30254 100644 --- a/Tests/TestifyTests/TestifyTests.swift +++ b/Tests/TestifySDKTests/TestifySDKTests.swift @@ -1,5 +1,5 @@ import XCTest -@testable import Testify +@testable import TestifySDK final class TestifyTests: XCTestCase { @@ -23,11 +23,12 @@ final class TestifyTests: XCTestCase { let assetsUrl = URL(fileURLWithPath: String(packageRootPath)).appendingPathComponent("Tests") .appendingPathComponent("Assets") - + let decoder = RawTestResultDecoder() + for file in testFiles { - let testUrl = assetsUrl.appendingPathComponent(file) + let testUrl = assetsUrl.appendingPathComponent("/tests/" + file) .appendingPathExtension("tests") - let jsonUrl = assetsUrl.appendingPathComponent(file) + let jsonUrl = assetsUrl.appendingPathComponent("/json/" + file) .appendingPathExtension("json") let testData = try Data(contentsOf: testUrl) @@ -35,7 +36,7 @@ final class TestifyTests: XCTestCase { return XCTFail("Could not decode test data.") } let resultData = try Data(contentsOf: jsonUrl) - let suite = TestSuite.parse(testOutput) + let suite = try decoder.decode(testOutput) let decoder = JSONDecoder() decoder.dateDecodingStrategy = .secondsSince1970 @@ -52,4 +53,5 @@ final class TestifyTests: XCTestCase { testSuite1.cases.count == testSuite2.cases.count && testSuite1.children.count == testSuite2.children.count } + } diff --git a/cov.sh b/cov.sh new file mode 100755 index 0000000..2b982cc --- /dev/null +++ b/cov.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +BIN_PATH="$(swift build --show-bin-path)" +XCTEST_PATH="$(find ${BIN_PATH} -name '*.xctest')" + +COV_BIN=$XCTEST_PATH +if [[ "$OSTYPE" == "darwin"* ]]; then + f="$(basename $XCTEST_PATH .xctest)" + COV_BIN="${COV_BIN}/Contents/MacOS/$f" +fi + +#llvm-cov report \ +# -instr-profile=.build/debug/codecov/default.profdata \ +# -ignore-filename-regex=".build|Tests" \ +# -use-color \ +# "${COV_BIN}" + +# brew install lcov +# yum -y install lcov +llvm-cov export \ + --format=lcov \ + -instr-profile ".build/debug/codecov/default.profdata" \ + -ignore-filename-regex=".build|Tests" \ + "${COV_BIN}" > lcov.data + +# genhtml lcov.data --output-directory out