From fa0d50f9283b6a357be85f3631c039d42a1b410b Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 28 Sep 2018 10:10:56 -0400 Subject: [PATCH 01/11] feat(parse): add xml parse Signed-off-by: Naylin Medina --- .../test_report/actions/test_report_action.rb | 56 +++++++++++++++++-- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/lib/fastlane/plugin/test_report/actions/test_report_action.rb b/lib/fastlane/plugin/test_report/actions/test_report_action.rb index f4c6dfe..2bc5eb8 100644 --- a/lib/fastlane/plugin/test_report/actions/test_report_action.rb +++ b/lib/fastlane/plugin/test_report/actions/test_report_action.rb @@ -1,15 +1,60 @@ require 'fastlane/action' require_relative '../helper/test_report_helper' +require "erb" +require "nokogiri" module Fastlane module Actions class TestReportAction < Action def self.run(params) UI.message("The test_report plugin is working!") + + report = File.read(File.expand_path(params[:path])) + doc = Nokogiri::XML(File.open(report)) + test_suite_name = @doc.xpath('//test_suite').attr("name") + + template = '--- + layout: testReport + --- + +
+
+

Test Results

+
+
+

8 tests

+
+
+<% test_suite_name.each do |name| %> +
+
+

<%= name %>

+

1 tests

+
+<% end %> +
+ +
+ + +
+
+
' + + result = ERB.new(template).result(binding()) + + open('test-report/index.html', 'w') do |f| + f.puts result + end + end def self.description - "customized template for test reports" + "Create customized HTML template for test reports" end def self.authors @@ -27,11 +72,10 @@ def self.details def self.available_options [ - # FastlaneCore::ConfigItem.new(key: :your_option, - # env_name: "TEST_REPORT_YOUR_OPTION", - # description: "A description of your option", - # optional: false, - # type: String) + FastlaneCore::ConfigItem.new(key: :path, + env_name: "TEST_REPORT_PATH", + description: "Path to the test report", + default_value: './fastlane/test_output/report.xml') ] end From 66f34f76c2b29a423b7f120b7c8a427aca2cb23a Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Mon, 1 Oct 2018 13:02:28 -0400 Subject: [PATCH 02/11] feat(template): add template Signed-off-by: Naylin Medina --- .../test_report/actions/test_report_action.rb | 94 ++++++++++++------- 1 file changed, 60 insertions(+), 34 deletions(-) diff --git a/lib/fastlane/plugin/test_report/actions/test_report_action.rb b/lib/fastlane/plugin/test_report/actions/test_report_action.rb index 2bc5eb8..50586e6 100644 --- a/lib/fastlane/plugin/test_report/actions/test_report_action.rb +++ b/lib/fastlane/plugin/test_report/actions/test_report_action.rb @@ -1,7 +1,7 @@ require 'fastlane/action' require_relative '../helper/test_report_helper' require "erb" -require "nokogiri" +require "rexml/document" module Fastlane module Actions @@ -9,45 +9,71 @@ class TestReportAction < Action def self.run(params) UI.message("The test_report plugin is working!") - report = File.read(File.expand_path(params[:path])) - doc = Nokogiri::XML(File.open(report)) - test_suite_name = @doc.xpath('//test_suite').attr("name") + include REXML + + File.rename("fastlane/test_output/report.junit", "fastlane/test_output/report.xml") + + file = File.new(File.expand_path(params[:report_path])) + doc = Document.new(file) template = '--- layout: testReport --- - -
-
-

Test Results

-
-
-

8 tests

-
-
-<% test_suite_name.each do |name| %> -
-
-

<%= name %>

-

1 tests

-
-<% end %> -
- -
- - -
-
-
' + +
+

Test Results

+

<%= doc.root.attributes["tests"] %> tests

+
+
+ <% i = 0 %> + <% doc.elements.each("testsuites/testsuite") do |name| %> + <% i = i + 1 %> + <% if name.attributes["failures"] == "0" %> +
)"> + <% else %> +
)"> + <% end %> +

<%= name.attributes["name"] %>

+

<%= name.attributes["tests"] %> tests

+
+ +
"> + + <% doc.elements.each("testsuites/testsuite/testcase") do |test| %> + <% if test.attributes["classname"] == name.attributes["name"] %> + + <% if test.attributes["time"] == nil %> +
+
+

<%= test.attributes["name"] %>

+
+
+

<%= test.elements["failure"].attributes["message"] %>

+
+
+

<%= test.elements["failure"].text %>

+
+
+ <% else %> +
+
+

<%= test.attributes["name"] %>

+
+
+

<%= test.attributes["time"] %>

+
+
+ <% end %> + <% end %> + <% end %> +
+ <% end %> + +
' result = ERB.new(template).result(binding()) - open('test-report/index.html', 'w') do |f| + open('fastlane/test_output/index.html', 'w') do |f| f.puts result end @@ -72,7 +98,7 @@ def self.details def self.available_options [ - FastlaneCore::ConfigItem.new(key: :path, + FastlaneCore::ConfigItem.new(key: :report_path, env_name: "TEST_REPORT_PATH", description: "Path to the test report", default_value: './fastlane/test_output/report.xml') From 6f575d3a2ba820760ce4594c220dd92c83be10dc Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 12:07:16 -0400 Subject: [PATCH 03/11] feat(template): add path for custom template Signed-off-by: Naylin Medina --- .../test_report/actions/test_report_action.rb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/fastlane/plugin/test_report/actions/test_report_action.rb b/lib/fastlane/plugin/test_report/actions/test_report_action.rb index 50586e6..15e80c4 100644 --- a/lib/fastlane/plugin/test_report/actions/test_report_action.rb +++ b/lib/fastlane/plugin/test_report/actions/test_report_action.rb @@ -16,9 +16,10 @@ def self.run(params) file = File.new(File.expand_path(params[:report_path])) doc = Document.new(file) + if params[:template_path] == nil template = '--- - layout: testReport - --- +layout: testReport +---

Test Results

@@ -70,10 +71,13 @@ def self.run(params) <% end %>
' + else + template = File.read(params[:template_path]) + end result = ERB.new(template).result(binding()) - open('fastlane/test_output/index.html', 'w') do |f| + open('./fastlane/test_output/index.html', 'w') do |f| f.puts result end @@ -101,7 +105,12 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :report_path, env_name: "TEST_REPORT_PATH", description: "Path to the test report", - default_value: './fastlane/test_output/report.xml') + default_value: './fastlane/test_output/report.xml'), + FastlaneCore::ConfigItem.new(key: :template_path, + env_name: "TEMPLATE_PATH", + description: "Path to the template", + type: String, + optional: true) ] end From 447813e64fe25e4818f891694467665276ec1be7 Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 13:16:34 -0400 Subject: [PATCH 04/11] docs(github): add issue and pr templates Signed-off-by: Naylin Medina --- .github/ISSUE_TEMPLATE.md | 9 ++++++ .github/ISSUE_TEMPLATE/Bug_report.md | 35 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/Feature_request.md | 17 +++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 28 ++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/Bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/Feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..afc1b98 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,9 @@ + + +#### Observed Results: + + + +#### Expected behavior: + + diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md new file mode 100644 index 0000000..4de26c7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md new file mode 100644 index 0000000..5384295 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6d4409e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,28 @@ +### Changes description + + + +### Checklist + +Please check if your PR fulfills the following specifications: + +- [ ] Tests for the changes have been added +- [ ] Docs have been added/updated + +### Estimated time + + + +|Assignee|:tomato:| +|:---|:---:| +|@ |1| + + + +### References + + + +Closes #N/A +Related #N/A +Depends on #N/A \ No newline at end of file From 083911fb7dcd89f2a97f19966ac3b4a5339bdc89 Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 13:24:17 -0400 Subject: [PATCH 05/11] docs(github): add bot settings Signed-off-by: Naylin Medina --- .github/invite-contributors.yml | 3 +++ .github/settings.yml | 48 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/invite-contributors.yml create mode 100644 .github/settings.yml diff --git a/.github/invite-contributors.yml b/.github/invite-contributors.yml new file mode 100644 index 0000000..0fc3d8d --- /dev/null +++ b/.github/invite-contributors.yml @@ -0,0 +1,3 @@ +isOutside: true +# Team Name +team: contributors diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..7fb8e1f --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,48 @@ +repository: + name: fastlane-plugin-test_report + description: Create customized html for iOS test report + homepage: https://teclib.github.io/fastlane-plugin-test_report/ + topics: fastlane-plugin, xml, test-report + private: false + has_issues: true + has_wiki: false + has_downloads: true + default_branch: develop + allow_squash_merge: true + allow_merge_commit: false + allow_rebase_merge: true +labels: + - name: bug + color: f44336 + - name: build + color: 795548 + - name: cherry-pick + color: af1c46 + - name: ci + color: fbca04 + - name: documentation + color: 607d8b + - name: duplicate + color: 9e9e9e + - name: feature + color: 3f51b5 + - name: hacktoberfest + color: ff625f + - name: invalid + color: cddc39 + - name: performance + color: 009688 + - name: question + color: ff5722 + - name: refactor + color: 9c27b0 + - name: style + color: 2196f3 + - name: test + color: 8bc34a + - name: wontfix + color: ffffff + - name: help wanted + color: 33aa3f + - name: good first issue + color: 7057ff From 058dee5a147e777ae88029fe5aebedb888df9b5b Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 13:32:07 -0400 Subject: [PATCH 06/11] docs(license): change format to md Signed-off-by: Naylin Medina --- LICENSE => LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename LICENSE => LICENSE.md (95%) diff --git a/LICENSE b/LICENSE.md similarity index 95% rename from LICENSE rename to LICENSE.md index f48374f..6a7f8e5 100644 --- a/LICENSE +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Naylin Medina +Copyright (c) 2018 Teclib' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From daeb6f19fcf868b41f046c08e1ff5b98a50c582e Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 13:34:12 -0400 Subject: [PATCH 07/11] build(package): add teclib information Signed-off-by: Naylin Medina --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 56088af..ab82286 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ "email": "nmedina@teclib.com" }, "license": "MIT", - "social_media_url": "https://twitter.com/FlyveMDM", + "social_media_url": "https://twitter.com/Teclib", "bugs": { - "url": "https://github.com/Naylin15/fastlane-plugin-test_report/issues" + "url": "https://github.com/TECLIB/fastlane-plugin-test_report/issues" }, "devDependencies": { "conventional-github-releaser": "^3.1.2", From 8e054a974a94cc4f2cb3ec18572478546a3e3036 Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 14:26:13 -0400 Subject: [PATCH 08/11] ci(travis): remove config file Signed-off-by: Naylin Medina --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3b35e45..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -# os: osx # enable this if you need macOS support -language: ruby -rvm: - - 2.2.4 From 3a7574d5c1e58996548acf88babf54936f592413 Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 14:26:43 -0400 Subject: [PATCH 09/11] docs(github): add code of conduct Signed-off-by: Naylin Medina --- CODE_OF_CONDUCT.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..7f4dc95 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@teclib.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ From 61c57cb5eaa1650f9492a89db6349521d47c1680 Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 14:27:22 -0400 Subject: [PATCH 10/11] docs(github): add contributing guidelines Signed-off-by: Naylin Medina --- CONTRIBUTING.md | 435 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 435 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..291e8cf --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,435 @@ +# How to contribute to Teclib Fastlane plugin test report + +Welcome to our ever-growing community :octocat:! + +We are more than happy to accept external contributions to the project in the form of feedback, translations, bug reports, and even better, pull requests. + +We present you here the guidelines to start contributing in any of the Teclib' projects. + +# Table of contents + +- 1 [See what’s going on](#1) + - 1.1 [Issue Dashboard](#1.1) + - 1.2 [Pull Request Dashboard](#1.2) +- 2 [Assistance](#2) + - 2.1 [Live Support](#2.1) + - 2.2 [Technical Questions](#2.2) + - 2.3 [Discussion](#2.3) + - 2.4 [Customers Assistance](#2.4) +- 3 [Feature Requests](#3) + - 3.1 [Requirement for a Feature Request](#3.1) + - 3.1.1 [Major Feature Request](#3.1.1) + - 3.1.2 [Minor Feature Request](#3.1.2) + - 3.2 [Request a New Feature](#3.2) +- 4 [Submitting](#4) + - 4.1 [How to Submit an Issue or Bugs](#4.1) + - 4.1.1 [Check for Past Issues or Bugs](#4.1.1) + - 4.1.2 [Try to Reproduce It!](#4.1.2) + - 4.1.3 [Isolate the Problem](#4.1.3) + - 4.1.4 [Information Needed for the Report](#4.1.4) + - 4.1.5 [Submit an Issue](#4.1.5) + - 4.2 [How to Create a Pull Request (PR)](#4.2) + - 4.2.1 [Create a Fork](#4.2.1) + - 4.2.1.1 [Keep updated your Fork](#4.2.1.1) + - 4.2.2 [Create a Branch and Naming it](#4.2.2) + - 4.2.3 [Make Changes](#4.2.3) + - 4.2.4 [Commit Your Changes](#4.2.4) + - 4.2.4.1 [Rules to Follow](#4.2.4.1) + - 4.2.4.2 [Commit Format](#4.2.4.2) + - 4.2.4.2.1 [Header: Writing a `type`](#4.2.4.2.1) + - 4.2.4.2.2 [Header: Writing the `(optional scope)`](#4.2.4.2.2 ) + - 4.2.4.2.3 [Header: Writing a `description`](#4.2.4.2.3) + - 4.2.4.2.4 [Header Lenght](#4.2.4.2.4) + - 4.2.4.2.5 [Writing the `optional body`](#4.2.4.2.5) + - 4.2.4.2.6 [Writing the `optional footer`](#4.2.4.2.6) + - 4.2.4.3 [Commit Examples](#4.2.4.3) + - 4.2.5 [Push your Changes](#4.2.5) + - 4.2.6 [Create a Pull Request](#4.2.6) + - 4.2.6.1 [How to Write a Title for a Pull Request](#4.2.6.1) + - 4.2.6.2 [Before Send a Pull Request](#4.2.6.2) + - 4.2.6.3 [How We Check your Submission](#4.2.6.3) + - 4.2.6.3.1 [Status Check](#4.2.6.3.1) + - 4.2.6.3.2 [App/Bots List](#4.2.6.3.2) + - 4.2.7 [How to proceed with suggestions](#4.2.7) +- 5 [What to do next?](#5) +- 6 [Coding Rules](#6) + +# 1. See what's going on! [:top:](#top) + +## 1.1 Issue Dashboard +If you want to know all the issues we're dealing with right now, take a look at our [Issue Dashboard](https://github.com/TECLIB/fastlane-plugin-test_report/issues) and look for areas in which you can help. + + +## 1.2 Pull Request Dashboard +If you want to give us a hand solving issues then great, take a look at our [Pull Request Dashboard](https://github.com/TECLIB/fastlane-plugin-test_report/pulls) and check for an open or closed PR. We don’t want to duplicate efforts. + +# 2. Assistance [:top:](#top) + +## 2.1 Live Support +You can find us in [Telegram](https://t.me/flyvemdm), we'll help you as soon as possible. + +## 2.2 Technical Questions +For general technical questions, post an appropriately tagged question on [StackOverflow](http://stackoverflow.com/). + +## 2.3 Discussion +For general discussion, use the [Flyve-MDM mailing list](http://mail.ow2.org/wws/info/flyve-mdm-dev). + +## 2.4 Customers Assistance +Use our official [support channel](https://support.teclib.com/). + +# 3. Feature Requests [:top:](#top) + +## 3.1 Requirement for a Feature Request +If you like to _implement_ a new feature please [submit an Issue](https://github.com/TECLIB/fastlane-plugin-test_report/issues/new) with a proposal, so we can be sure it's relevant. + +### 3.1.1 Major Feature Request +For a major new feature request, [open an Issue](https://github.com/TECLIB/fastlane-plugin-test_report/issues/new) and outline your proposal so it can be discussed. + +### 3.1.2 Minor Feature Request +For a minor new feature request, you can craft it and directly [submit it as a Pull Request](https://github.com/TECLIB/fastlane-plugin-test_report/pulls), we'll take care of it. + +## 3.2 Request a New Feature +You can request a new feature by [submitting an Issue](https://github.com/TECLIB/fastlane-plugin-test_report/issues/new). + +# 4. Submitting [:top:](#top) + +## 4.1 How to Submit an Issue or Bugs + +A good Issue/Bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What would you expect to be the outcome? All these details will help people to fix any potential bugs. + +A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful, here are steps to follow to build a good one: + +### 4.1.1 Check for Past Issues or Bugs +Before submitting the issue please check the [Issue Tracker](https://github.com/TECLIB/fastlane-plugin-test_report/issues/), maybe the issue/bug was already reported by another contributor. By doing this you help us maximize the effort spent on solving problems and the addition of new features. + +### 4.1.2 Try to Reproduce It! +Try to reproduce this issue/bug using the latest `develop` branch in the repository [Check it here](https://github.com/TECLIB/fastlane-plugin-test_report/branches). + +### 4.1.3 Isolate the Problem +Ideally, create a reduced test case. We prefer bug reports with small, portable test cases. + +### 4.1.4 Information Needed for the Report +We require the following information: + +* :warning: **Observed Results:** A brief description of the problem. +* :mag_right: **What steps will reproduce the issue?:** If suitable, including the steps required to reproduce the bug. +* :boom: **Expected Results:** What did you expect to happen? + +### 4.1.5 Submit an Issue. :rocket: +Having all data at hand, file the new issue by filling out our [Issue form](https://github.com/TECLIB/fastlane-plugin-test_report/issues/new). + +**— That's it! :tada:** + +## 4.2 How to Create a Pull Request (PR) [:top:](#top) + +Before submitting a Pull Request, check for an open or closed PR that relates to your submission. We don't want to duplicate efforts. + +### 4.2.1 Create a Fork + +Fork the repository before making any changes, a fork is a copy of the repository which allows you to _freely experiment with changes_ without affecting the original project. + +Go to the top-right corner on GitHub, and click on ![Fork](https://github.com/Naylin15/Screenshots/blob/master/docs/fork.png?raw=true) + +### 4.2.1.1 Keep updated your Fork + +To avoid and also to solve conflicts in your PR, you must update your Fork since other team mates may have already submitted their work. + +Following this [Gist](https://gist.github.com/CristinaSolana/1885435): + +**1 - Clone your fork** + +```git clone git@github.com:YOUR-USER-NAME/android-mdm-agent.git``` + +**2 - Add remote upstream** + +```shell + +cd path/to/your/fork/ +git remote add upstream git://github.com/TECLIB/fastlane-plugin-test_report.git + +``` + +**3 - Update your fork** + +```shell + +git fetch upstream +git pull upstream develop + +``` + +:memo: **Note:** You can pull from any branch of the remote repo. + +### 4.2.2 Create a Branch and Naming it + +The project is organized according to the branch model [Git Flow.](http://nvie.com/posts/a-successful-git-branching-model/) Create a new branch before committing any changes. A _branch is a parallel version of a repository._ It is contained within the repository but does not affect the **`primary or master`** branch. + +:heavy_exclamation_mark: **Branch Name Format: `feature/my-killer-feature`**. + +:no_entry_sign: **Important:** Do not commit to our default **`develop`** branch. Name it anything _except master, develop, release-*, or hotfix-*_. We'll use **`created-branch`** an example. + +### 4.2.3 Make Changes + +Make your changes in your **newly created** branch. + +```console + + git checkout -b feature/created-branch develop + +``` + +### 4.2.4 Commit Your Changes +A commit, or "revision", is an individual change to a file (or set of files). It's like when you save a file, except with Git, every time you save it creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep a record of what changes were made when and by who. Commits usually contain a commit message which is a brief description of what changes were made. + +### 4.2.4.1 Rules to Follow +For commits, we follow the [Conventional Commit](http://conventionalcommits.org/). This leads to **more readable messages** that are easy to follow when looking through the project history. But also, we use the git commit messages to **automatically generate changelogs** from these messages. + +### 4.2.4.2 Commit Format +Each commit message consists of a **header**, a **body**, and a **footer**. The header has a special +format that includes a **type**, a **scope**, and a **description**: + +**:warning: Important:** Please avoid generic terms. + +The commit message should be structured as follows: + +```console +type(optional scope): description + +optional body + +optional footer +``` + +### 4.2.4.2.1 Header: Writing a `type` +Commits must be prefixed with a type, which consists of a verb, **feat, fix, build,** followed by a colon and space. + +**Your options:** + +* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm). +* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs). +* **docs**: Documentation only changes. +* **feat**: A new feature. +* **fix**: A bug fix. +* **perf**: A code change that improves performance. +* **refactor**: A code change that neither fixes a bug or adds a feature. +* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc). +* **test**: Adding missing tests or correcting existing tests. + +--- +>**Example for `type`:** +>:point_right:feat:point_left:(parser): add ability to parse arrays +--- + +### 4.2.4.2.2 Header: Writing the `(optional scope)` +Refers to the extent, subject matter or contextual information about your changes. A scope is a phrase describing the file modified or a section of the codebase, it’s always enclosed in parenthesis. + +--- +> **Example for a `(optional scope)`:** +> feat:point_right:(parser):point_left:: add ability to parse arrays +--- + +### 4.2.4.2.3 Header: Writing a `description` +A description must immediately follow the **`type(optional scope):`** The description is a short description of the commit. + +**Important** +* About commit character length, keep it concise and don't write more than **50 characters**. +* Use the imperative present tense: change, make, add, update, fix, etc; Do not use changed, changes, added, fixes, fixed, etc. +* Don't capitalize the first letter. +* Do not use a dot (.) at the end. + +--- +>**Example for ``**: +>feat(parser)::point_right:add ability to parse arrays:point_left: +--- + +### 4.2.4.2.4 Header Lenght +The **header** cannot be longer than 100 characters. This allows the message to be easier to read on GitHub as well as in various git tools. + +### 4.2.4.2.5 Writing the `optional body` +The body should include the motivation for the change and contrast this with previous behavior. + +--- +>**Example for `optional body`**: +```console +fix orthography +remove out of date paragraph +fix broken links +``` +--- + +### 4.2.4.2.6 Writing the `optional footer` +The `` should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-using-keywords/) if any. + +For example, to close an issue numbered **`123`**, you could use the phrases **`Closes #123`** in your pull request description or commit message. Once the branch is merged into the default branch, the issue will close. + +--- +>**Example for `optional footer`**: +>:point_right:Closes #123:point_left: +--- + +### 4.2.4.3 Commit Examples +:shit: +**Bad** + +```console +docs(readme): fix orthography, remove out of date paragraph and fix broken links +``` + +:+1: +**Good** + +```console +docs(readme): document design improvement change content + +fix orthography +remove out of date paragraph +fix broken links +``` + +### 4.2.5 Push your Changes +Pushing refers to **sending your committed changes to a remote repository**, such as a repository hosted on GitHub. For instance, if you change something locally, you'd want to then push those changes so that others may access them. + +After working on your changes you need to Push it (upload) your **newly created branch** to GitHub + +```git push origin feature/created-branch``` + +Then you'll need to run: + +```git push --set-upstream origin feature/created-branch``` + +### 4.2.6 Create a Pull Request + +Pull requests or PR are **proposed changes** to a repository submitted by a user and accepted or rejected by a repository's collaborators. + +After all the work being pushed to the newly created branch, In GitHub, send a pull request to our [repository.](https://github.com/TECLIB/fastlane-plugin-test_report/pulls) + +### 4.2.6.1 How to Write a Title for a Pull Request +Pull Request should be named in reference to the main fix or feature you provide; minor information can be added to the description. Please be specific and don't use generic terms. + +**:warning: Important:** Please avoid generic terms. + +:straight_ruler: +**Title Length:** Keep it concise and don't write more than **50 characters** in the title. + +:construction: +**For Work in Progress (WIP):** If you don’t want your PR to be merged accidentally, add the word "wip" or "WIP" to its title and the [WIP bot](https://github.com/apps/wip) will set its status to error. + +--- +>**Example for `Titles for work in progress (WIP):`** +>:point_right:WIP Added a Table of Content for the Contributing Guideline Document.:point_left: +--- + +:white_check_mark: +**Finalized Work:** If you are done with your work and want it to be merged, just write a descriptive title with no more than 50 characters. + +--- +>**Example for `Titles for Finalized Work:`** +>:point_right:Added a Table of Content for the Contributing Guideline Document.:point_left: +--- + +### 4.2.6.2 Before Send a Pull Request + +**1 - Pull Request Description:** Write a description about the changes, we provide a [template](https://github.com/TECLIB/fastlane-plugin-test_report/community) for Pull Request descriptions. When you're creating a Pull Request it'll be shown automatically. Just fill it out and you're done. + +**2 - Choose the right label**: Look at the [list of available labels.](https://github.com/TECLIB/fastlane-plugin-test_report/issues/labels) + +**3 - Smash that button!** Press that _Create Pull Request_ button and you're done. + +**— That's it! :tada:** + +### 4.2.6.3 How We Check your Submission + +#### 4.2.6.3.1 Status Check :rotating_light: + +Required status checks ensure us that all required tests are passing before collaborators can make changes to a protected branch. We enforce status checks before a branch is merged. + +The type of required status check we choose is _Loose_, not all of them are required but some of them determines whether your changes will be reviewed or not. Some of them are here on this list, although, some of them may not be implemented in all repositories: + +#### 4.2.6.3.2 App/Bots List :traffic_light: + +**WIP:** Refers to Work In Progress, this app helps you to prevent your PR to be merged accidentally, add the word "wip" or "WIP" to its title and WIP bot will set its status to error. When you write WIP in the PR title it means that your changes are still in progress or unfinished, so it won't be reviewed until the WIP is removed. + +_WIP: Maintainers: Required / Contributors: Required_ + +**AccessLint:** When a pull request is opened, AccessLint reviews the changes and comments with any new accessibility issues, giving you quick, timely, and targeted feedback, before code goes live. + +_AccessLint: Maintainers: Required / Contributors: Required_ + +**GPG:** After installation, this app checks all commits of new (or newly updated) pull requests for valid GPG signatures according to the GitHub API. + +_GPG: Maintainers: Required / Contributors: Optional_ + +**validate-commit-msg:** Runs validate-commit-msg over all commits of new or edited pull requests and sets an appropriate status check. + +_validate-commit-msg: Maintainers: Required / Contributors: Required_ + +**DCO:** This App enforces the Developer Certificate of Origin (DCO) on Pull Requests. It requires all commit messages to contain the Signed-off-by line with an email address that matches the commit author. + +_DCO: Maintainers: Required / Contributors: Optional_ + +**DEP:** A Github App that helps to manage Pull Request dependencies. That App works similar to typical CI services ( e.g Travis) but instead of running a test suite, It will check whether a pull request dependencies are resolved. + +_DEP: Maintainers: Required / Contributors: Required_ + +**ci/circleci build:** CircleCI acts as a platform for both Continuous Integration and Continuous Deployment. If your tests pass, then you can deploy your code to development, staging, production, or other environments. + +_ci/circleci build: Maintainers: Required / Contributors: Required_ + +**continuous-integration/travis-ci/push(and pr):** An automatic construction of the requested changes is carried out and the tests are executed automatically. + +_continuous-integration/travis-ci/push(and pr): Maintainers: Required / Contributors: Required_ + +### 4.2.7 How to proceed with suggestions + +If we suggest changes then: +* Make the required updates. +* Re-run the test suites to ensure tests are still passing. +* Rebase your branch and force push to your GitHub repository (this will update your Pull Request): + + ```shell + git rebase develop -i + git push -f + ``` +:warning: +**Remove the WIP label:** When a PR is ready for review, remove the prefix WIP in the PR title. + +# 5. What to do next? [:top:](#top) + +After your pull request is merged, you can safely delete your branch and pull the changes +from the main (upstream) repository: + +* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: + + ```shell + git push origin --delete feature/created-branch + ``` + +* Check out the develop branch: + + ```shell + git checkout develop -f + ``` + +* Delete the local branch: + + ```shell + git branch -D feature/created-branch + ``` + +* Update develop with the latest upstream version: + + ```shell + git pull --ff upstream develop + ``` + +# 6. Coding Rules [:top:](#top) + +To ensure consistency throughout the source code, keep these rules in mind as you are working: + +- All features or bug fixes must be tested by one or more specs (unit-tests). + - Build the App with Android Studio, select the AndroidTest folder right-click on the directory and select Run tests. +- All methods must be documented. + +# Good luck! :tada: + +[![flyve hero](https://github.com/flyve-mdm/glpi-plugin/raw/develop/images/footer.png)](https://flyve-mdm.com/) \ No newline at end of file From eb2d21e0c9b2533698a437dd49f7491b336e3656 Mon Sep 17 00:00:00 2001 From: Naylin Medina Date: Fri, 5 Oct 2018 14:47:46 -0400 Subject: [PATCH 11/11] docs(readme): add template Signed-off-by: Naylin Medina --- README.md | 87 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 4a03e7b..cc5e8df 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,39 @@ -# test_report plugin +# Test Report plugin for Fastlane +![Teclib' Banner](https://user-images.githubusercontent.com/29282308/31669540-abed67a8-b355-11e7-98e2-0ad190f37088.png) + +[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/TECLIB/fastlane-plugin-test_report/blob/develop/LICENSE.md) [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-test_report) +[![Telegram Community](https://img.shields.io/badge/Telegram-Community-blue.svg)](https://t.me/flyvemdm) +[![IRC Chat](https://img.shields.io/badge/IRC-%23flyvemdm-green.svg)](http://webchat.freenode.net/?channels=flyve-mdm) +[![Follow twitter](https://img.shields.io/badge/Twitter-Teclib%27-940CA5.svg)](https://twitter.com/teclib) +[![Project Status: Active](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) + +## Table of Contents + +* [Synopsis](#synopsis) +* [Build Status](#build-status) +* [Installation](#installation) +* [Examples](#examples) +* [Documentation](#documentation) +* [Versioning](#versioning) +* [Contact](#contact) +* [Professional Services](#professional-services) +* [Contribute](#contribute) +* [Copying](#copying) + +## Synopsis + +Create a customized HTML for iOS test reports from an XML file. + +## Build Status -## Getting Started +|**LTS**|**Bleeding Edge**| +|:---:|:---:| +|[![Circle CI build](https://circleci.com/gh/TECLIB/fastlane-plugin-test_report/tree/master.svg?style=svg)](https://circleci.com/gh/TECLIB/fastlane-plugin-test_report/tree/master)|[![Circle CI build](https://circleci.com/gh/TECLIB/fastlane-plugin-test_report/tree/develop.svg?style=svg)](https://circleci.com/gh/TECLIB/fastlane-plugin-test_report/tree/develop)| + +## Installation This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-test_report`, add it to your project by running: @@ -10,43 +41,49 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To fastlane add_plugin test_report ``` -## About test_report +Or add in your Pluginfile, and then run bundle install -customized template for test reports +```gem 'fastlane-plugin-test_report'``` -**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here. +## Examples -## Example +Check these repositories: -Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`. +* [Flyve MDM iOS Inventory Agent](https://github.com/flyve-mdm/ios-inventory-agent) +* [Flyve MDM iOS MDM Agent](https://github.com/flyve-mdm/ios-mdm-agent) +* [Flyve MDM iOS MDM Dashboard](https://github.com/flyve-mdm/ios-mdm-dashboard) +* [Flyve MDM iOS Inventory Library](https://github.com/flyve-mdm/ios-inventory-library) -**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary) +## Documentation -## Run tests for this plugin +We maintain a detailed documentation on the project site, check the [How-tos](https://teclib.github.io/fastlane-plugin-test_report/howtos/) and [Development](https://teclib.github.io/fastlane-plugin-test_report/) section. -To run both the tests, and code style validation, run +## Versioning -``` -rake -``` +In order to provide transparency on our release cycle and to maintain backward compatibility, this project is maintained under [the Semantic Versioning guidelines](http://semver.org/). We are committed to following and complying with the rules, the best we can. -To automatically fix many of the styling issues, use -``` -rubocop -a -``` +See [the tags section of our GitHub project](https://github.com/TECLIB/fastlane-plugin-test_report/releases) for changelogs for each release version. Release announcement posts on [the official Teclib' blog](http://www.teclib-edition.com/en/communities/blog-posts/) contain summaries of the most noteworthy changes made in each release. + +## Contact -## Issues and Feedback +For notices about major changes and general discussion of development, subscribe to the [/r/flyvemdm](http://www.reddit.com/r/flyvemdm) subreddit. +You can also chat with us via IRC in [#flyve-mdm on freenode](http://webchat.freenode.net/?channels=flyve-mdm) if you get stuck, and [@flyvemdm on Telegram](https://t.me/flyvemdm). -For any other issues and feedback about this plugin, please submit it to this repository. +## Professional Services -## Troubleshooting +The Teclib' services are available through our [Partner's Network](http://www.teclib-edition.com/en/partners/). We provide special training, bug fixes with editor subscription, contributions for new features, and more. -If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide. +Obtain a personalized service experience, associated with benefits and opportunities. -## Using _fastlane_ Plugins +## Contribute -For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/). +Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our +guidelines for [contributing](https://github.com/TECLIB/fastlane-plugin-test_report/blob/develop/.github/CONTRIBUTING.md) and then check out one of our issues in the [Issues Dashboard](https://github.com/TECLIB/fastlane-plugin-test_report/issues). -## About _fastlane_ +## Copying -_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools). +* **Name**: [Flyve MDM](https://flyve-mdm.com/) is a registered trademark of [Teclib'](http://www.teclib-edition.com/en/). +* **Name**: [GLPI](http://glpi-project.org/) is a registered trademark of [Teclib'](http://www.teclib-edition.com/en/). +* **Code**: you can redistribute it and/or modify + it under the terms of the [MIT](https://opensource.org/licenses/MIT). +* **Documentation**: released under Attribution 4.0 International ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)).