diff options
author | Rémy Coutable <remy@rymai.me> | 2017-10-09 17:51:31 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-09 17:51:31 +0200 |
commit | 263482ac6d693c954af356e8f225cf2fe6c471ae (patch) | |
tree | 2b4bd8a8627c869b6c0a76d014e61530ae23153a | |
parent | 6486f365418c04cd40ee25c2f96dda3bec959b38 (diff) | |
download | gitlab-ce-rc/refactor-testing-docs.tar.gz |
Address feedback from Axilrc/refactor-testing-docs
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | PROCESS.md | 2 | ||||
-rw-r--r-- | doc/development/README.md | 52 | ||||
-rw-r--r-- | doc/development/fe_guide/testing.md | 4 | ||||
-rw-r--r-- | doc/development/testing.md | 4 | ||||
-rw-r--r-- | doc/development/testing_guide/best_practices.md | 6 | ||||
-rw-r--r-- | doc/development/testing_guide/flaky_tests.md | 2 | ||||
-rw-r--r-- | doc/development/testing_guide/frontend_testing.md | 6 | ||||
-rw-r--r-- | doc/development/testing_guide/index.md | 8 | ||||
-rw-r--r-- | doc/development/testing_guide/testing_levels.md | 4 | ||||
-rw-r--r-- | doc/development/testing_guide/testing_rake_tasks.md | 2 |
10 files changed, 43 insertions, 47 deletions
diff --git a/PROCESS.md b/PROCESS.md index 5e65bb59246..06963243b25 100644 --- a/PROCESS.md +++ b/PROCESS.md @@ -1,4 +1,4 @@ -## GitLab Core Team & GitLab Inc. Contribution Process +## GitLab core team & GitLab Inc. contribution process --- diff --git a/doc/development/README.md b/doc/development/README.md index 6d44714d9b0..e2d0c6c2056 100644 --- a/doc/development/README.md +++ b/doc/development/README.md @@ -1,27 +1,27 @@ -# Development +# GitLab development guides ## Get started! - Setup GitLab's development environment with [GitLab Development Kit (GDK)](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/README.md) -- [GitLab Contributing Guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) +- [GitLab contributing guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) - [Architecture](architecture.md) of GitLab - [Rake tasks](rake_tasks.md) for development ## Processes -- [GitLab Core Team & GitLab Inc. Contribution Process](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/PROCESS.md) +- [GitLab core team & GitLab Inc. contribution process](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/PROCESS.md) - [Generate a changelog entry with `bin/changelog`](changelog.md) - [Code review guidelines](code_review.md) for reviewing code and having code reviewed. - [Limit conflicts with EE when developing on CE](limit_ee_conflicts.md) -## UX and Frontend Guides +## UX and frontend guides - [UX guide](ux_guide/index.md) for building GitLab with existing CSS styles and elements - [Frontend guidelines](fe_guide/index.md) -## Backend Guides +## Backend guides -- [Testing Standards and Style guidelines](testing_guide/index.md) +- [Testing standards and style guidelines](testing_guide/index.md) - [API styleguide](api_styleguide.md) Use this styleguide if you are contributing to the API. - [Sidekiq guidelines](sidekiq_style_guide.md) for working with Sidekiq workers @@ -35,52 +35,52 @@ - [Issue and merge requests state models](object_state_models.md) - [How to dump production data to staging](db_dump.md) -## Performance Guides +## Performance guides - [Instrumentation](instrumentation.md) - [Performance guidelines](performance.md) - [Merge request performance guidelines](merge_request_performance_guidelines.md) for ensuring merge requests do not negatively impact GitLab performance -## Databases Guides +## Databases guides ### Migrations - [What requires downtime?](what_requires_downtime.md) - [SQL guidelines](sql.md) for working with SQL queries -- [Migrations Style Guide](migration_style_guide.md) for creating safe SQL migrations -- [Post Deployment Migrations](post_deployment_migrations.md) -- [Background Migrations](background_migrations.md) -- [Swapping Tables](swapping_tables.md) +- [Migrations style guide](migration_style_guide.md) for creating safe SQL migrations +- [Post deployment migrations](post_deployment_migrations.md) +- [Background migrations](background_migrations.md) +- [Swapping tables](swapping_tables.md) ### Best practices -- [Merge Request Checklist](database_merge_request_checklist.md) +- [Merge Request checklist](database_merge_request_checklist.md) - [Adding database indexes](adding_database_indexes.md) -- [Foreign Keys & Associations](foreign_keys.md) -- [Single Table Inheritance](single_table_inheritance.md) -- [Polymorphic Associations](polymorphic_associations.md) -- [Serializing Data](serializing_data.md) -- [Hash Indexes](hash_indexes.md) -- [Storing SHA1 Hashes As Binary](sha1_as_binary.md) -- [Iterating Tables In Batches](iterating_tables_in_batches.md) -- [Ordering Table Columns](ordering_table_columns.md) -- [Verifying Database Capabilities](verifying_database_capabilities.md) - -## Documentation Guides +- [Foreign keys & associations](foreign_keys.md) +- [Single table inheritance](single_table_inheritance.md) +- [Polymorphic associations](polymorphic_associations.md) +- [Serializing data](serializing_data.md) +- [Hash indexes](hash_indexes.md) +- [Storing SHA1 hashes as binary](sha1_as_binary.md) +- [Iterating tables in batches](iterating_tables_in_batches.md) +- [Ordering table columns](ordering_table_columns.md) +- [Verifying database capabilities](verifying_database_capabilities.md) + +## Documentation guides - [Documentation styleguide](doc_styleguide.md): Use this styleguide if you are contributing to the documentation. - [Writing documentation](writing_documentation.md) - [Distinction between general documentation and technical articles](writing_documentation.md#distinction-between-general-documentation-and-technical-articles) -## Internationalization (i18n) Guides +## Internationalization (i18n) guides - [Introduction](i18n/index.md) - [Externalization](i18n/externalization.md) - [Translation](i18n/translation.md) -## Build Guides +## Build guides - [Building a package for testing purposes](build_test_package.md) diff --git a/doc/development/fe_guide/testing.md b/doc/development/fe_guide/testing.md index a4ada90e515..98e499b8c0f 100644 --- a/doc/development/fe_guide/testing.md +++ b/doc/development/fe_guide/testing.md @@ -1,3 +1 @@ -# Frontend Testing - -This page has moved [here](../testing_guide/frontend_testing.md). +This document was moved to [../testing_guide/frontend_testing.md](../testing_guide/frontend_testing.md). diff --git a/doc/development/testing.md b/doc/development/testing.md index 4b1a0a5fc14..45b1519ece8 100644 --- a/doc/development/testing.md +++ b/doc/development/testing.md @@ -1,3 +1 @@ -# Testing Standards and Style Guidelines - -This page has moved [here](testing_guide/index.md). +This document was moved to [testing_guide/index.md](testing_guide/index.md). diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 66bd56c13e8..613423dbd9a 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -1,4 +1,4 @@ -# Testing Best practices +# Testing best practices ## Test speed @@ -20,7 +20,7 @@ Here are some things to keep in mind regarding test performance: ## RSpec -### General Guidelines +### General guidelines - Use a single, top-level `describe ClassName` block. - Use `.method` to describe class methods and `#method` to describe instance @@ -156,7 +156,7 @@ complexity of RSpec expectations.They should be placed under a certain type of specs only (e.g. features, requests etc.) but shouldn't be if they apply to multiple type of specs. -#### have_gitlab_http_status +#### `have_gitlab_http_status` Prefer `have_gitlab_http_status` over `have_http_status` because the former could also show the response body whenever the status mismatched. This would diff --git a/doc/development/testing_guide/flaky_tests.md b/doc/development/testing_guide/flaky_tests.md index d52fa9a662d..bbb2313ea7b 100644 --- a/doc/development/testing_guide/flaky_tests.md +++ b/doc/development/testing_guide/flaky_tests.md @@ -57,7 +57,7 @@ This was originally implemented in: https://gitlab.com/gitlab-org/gitlab-ce/merg - [Don't wait for AJAX when no AJAX request is fired](https://gitlab.com/gitlab-org/gitlab-ce/issues/30461): https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10454 - [Bis](https://gitlab.com/gitlab-org/gitlab-ce/issues/34647): https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12626 -#### PhantomJS/WebKit related issues +#### PhantomJS / WebKit related issues - Memory is through the roof! (TL;DR: Load images but block images requests!): https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12003 diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index 1f12ebddd50..0c63f51cb45 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -1,4 +1,4 @@ -# Frontend Testing +# Frontend testing standards and style guidelines There are two types of test suites you'll encounter while developing frontend code at GitLab. We use Karma and Jasmine for JavaScript unit and integration testing, @@ -62,7 +62,7 @@ describe('.methodName', () => { }); }); ``` -#### Testing Promises +#### Testing promises When testing Promises you should always make sure that the test is asynchronous and rejections are handled. Your Promise chain should therefore end with a call of the `done` callback and `done.fail` in case an error occurred. @@ -165,7 +165,7 @@ excluded tests (with `fdescribe` or `xdescribe`) to get karma to run only the tests you want while you're working on a specific feature, but make sure to remove these directives when you commit your code. -## RSpec Feature Integration Tests +## RSpec feature integration tests Information on setting up and running RSpec integration tests with [Capybara] can be found in the [Testing Best Practices](best_practices.md). diff --git a/doc/development/testing_guide/index.md b/doc/development/testing_guide/index.md index 9db664db066..38b1fe1a193 100644 --- a/doc/development/testing_guide/index.md +++ b/doc/development/testing_guide/index.md @@ -1,4 +1,4 @@ -# Testing Standards and Style Guidelines +# Testing standards and style guidelines This document describes various guidelines and best practices for automated testing of the GitLab project. @@ -31,14 +31,14 @@ changes should be tested. --- -## [Testing Best practices](best_practices.md) +## [Testing best practices](best_practices.md) Everything you should know about how to write good tests: RSpec, FactoryGirl, system tests, parameterized tests etc. --- -## [Frontend Testing](frontend_testing.md) +## [Frontend testing standards and style guidelines](frontend_testing.md) Everything you should know about how to write good Frontend tests: Karma, testing promises, stubbing etc. @@ -59,7 +59,7 @@ parallelization, monitoring. --- -## [Testing Rake Tasks](testing_rake_tasks.md) +## [Testing Rake tasks](testing_rake_tasks.md) Everything you should know about how to test Rake tasks. diff --git a/doc/development/testing_guide/testing_levels.md b/doc/development/testing_guide/testing_levels.md index d6707f2ab75..9b9ba0baa71 100644 --- a/doc/development/testing_guide/testing_levels.md +++ b/doc/development/testing_guide/testing_levels.md @@ -67,7 +67,7 @@ run JavaScript tests, so you can either run unit tests (e.g. test a single JavaScript method), or integration tests (e.g. test a component that is composed of multiple components). -## System tests or Feature tests +## System tests or feature tests Formal definition: https://en.wikipedia.org/wiki/System_testing. @@ -108,7 +108,7 @@ The reasons why we should follow these best practices are as follows: [Poltergeist]: https://github.com/teamcapybara/capybara#poltergeist [RackTest]: https://github.com/teamcapybara/capybara#racktest -## Black-box tests or End-to-end tests +## Black-box tests or end-to-end tests GitLab consists of [multiple pieces] such as [GitLab Shell], [GitLab Workhorse], [Gitaly], [GitLab Pages], [GitLab Runner], and GitLab Rails. All theses pieces diff --git a/doc/development/testing_guide/testing_rake_tasks.md b/doc/development/testing_guide/testing_rake_tasks.md index 8b135731e7f..5bf185dd7b5 100644 --- a/doc/development/testing_guide/testing_rake_tasks.md +++ b/doc/development/testing_guide/testing_rake_tasks.md @@ -1,4 +1,4 @@ -## Testing Rake Tasks +## Testing Rake tasks To make testing Rake tasks a little easier, there is a helper that can be included in lieu of the standard Spec helper. Instead of `require 'spec_helper'`, use |