![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A gem command line tool to help with assembling test reports and pairing them with the testrail test cases
Add this line to your application's Gemfile:
gem 'swiftrail'
And then execute:
$ bundle
Mandatory options for all of the commands are
--test_classes=''
- regex for the path to swift tests--test_rail_username=''
- username for TestRail account--test_rail_password=''
- password for TestRail account--test_rail_url=''
- url for TestRail account--run_id=''
- run_id for which you want to run the commandIn your swift
projects you can mark any test class or specific test with any number of TestRail test cases. To mark them
specify the //testrail
and after that just list the corresponding case-ids. Example
//testrail C12344
class MyTests: XCTestCase {
//testrail C12344, C3267231
func test_first() {
}
//testrail C15
func test_second() {
}
func test_third() {
}
}
class MyOtherTests: XCTestCase {
//testrail C5555
func test_four() {
}
//testrail C15
func test_five() {
}
func test_six() {
}
}
If Quick/Nimble is used for generating tests, the above examples can't be used.
In order for SwiftRail to detect which tests are linked to which cases ids, you need to add this custom context in your project:
public func testRail(_ ids: Int..., flags: FilterFlags = [:], closure: () -> Void) {
let formattedTestrailCases = ids
.map({ "C\($0)" })
.joined(separator: " ")
context(formattedTestrailCases, flags: flags, closure: closure)
}
and then you can use it this way in your tests:
class MyControllerTests: QuickSpec {
override func spec() {
describe("MyControllerTests") {
testRail(12345, 22222, 33333) { // Add this new custom context
context("when creating it") {
let sut = "short string"
it("no output value") {
expect(sut).to(equal("short string")
}
}
}
}
}
It will generate test with the following name:
MyControllerTests__C12345_C22222_C33333__when_creating_it__no_output_value
And this test will be picked up by swiftrail and report it to testrail for the linked testrail cases!
When running report you additionaly have to pass location of the test_reports, and if you want strict mode
--test-reports=''
--strict
(default is false
)To be able to report the results of the tests, you need to first generate xml junit reports. Once you have those, running
swiftrail report --test-reports='path/to/test/reports' --run_id:123 (all the other options should also be included)
will report the results to TestRail. Dependent on success/failure the tests on TestRail will be marked accordingly.
If the strict mode is enabled, the upload will fail if you have test cases that are not present in the test run.
When running coverage you additionaly can pass output folder, where the report will be generated (if not passed it will print out to terminal)
--output_folder=''
Coverage report will give you the percentage of test cases covered by your ui/unit/... tests.
swiftrail coverage --run_id:123 (all the other options should also be included)
When running lint you additionaly can pass output folder, where the report will be generated (if not passed it will print out to terminal)
--output_folder=''
Lint will give you outadet case_ids that you have marked on your ui/unit tests, but no longer exist as test cases on TestRail.
swiftrail lint --run_id:123 (all the other options should also be included)
Bug reports and pull requests are welcome on GitHub at https://github.com/slavkokrucaj/swift-rail. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Swiftrail project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that swiftrail demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.