Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in CONTRIBUTING and TESTING markdown files from 3.3.0.0
- Loading branch information
1 parent
fefb442
commit ea3cac7
Showing
4 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Contributing | ||
So you want to contribute to ATLauncher? Well here are a few ways you can help make this project better! | ||
|
||
## Sending pull requests | ||
If you wish to send in a pull request, please keep in mind the below guidelines: | ||
|
||
- [Coding/Style Guidelines](STYLE.md) | ||
- [Testing Guidelines](TESTING.md) | ||
|
||
## Beta testing | ||
If you wish to help out with testing ATLauncher, please visit our IRC channel #ATLauncher-Testing on EsperNet and/or | ||
visiting our [build server](https://build.atlcdn.net) to get the latest versions of the launcher you can test out and | ||
create issues if you find any. | ||
|
||
## Translations | ||
If you wish to help with translating ATLauncher, please take a look at our | ||
[Translations repository](https://github.com/ATLauncher/Translations). | ||
|
||
## Community | ||
If you want to help in other ways, you can always visit our [forums](https://forums.atlauncher.com) or | ||
[subreddit](http://www.reddit.com/r/ATLauncher) and just be generally helpful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Testing | ||
While we haven't worked too much on testing in the past, we'd like to change that. Below is a simple set of rules we try | ||
to follow when making tests. | ||
|
||
## Directory structure | ||
When creating tests for a class it should be placed in the '/src/test/java/' folder within it's correct package name | ||
structure. | ||
|
||
For instance a test for 'com.atlauncher.SomeClass' would go in '/src/test/java/com/atlauncher/'. | ||
|
||
## Filenames of tests | ||
Tests should be named after their class name with 'Test' appended to it in the correct directory structure explained | ||
above. | ||
|
||
For instance a test for 'SomeClass' would be 'SomeClassTest'. | ||
|
||
## Writing test classes | ||
When writing a test class you're free to do as you please. | ||
|
||
When testing a classes methods we tend to stick to a method name of 'testMethodName' for testing a method in the class | ||
of 'methodName'. | ||
|
||
When testing something that isn't a classes method (such as an overall test of the class) we use helpful method names | ||
which explain what the test does. For example 'testsThatADoesBWhenCDoesD'. | ||
|
||
The best example for writing up test classes is to take a look at something existing and going from there. | ||
|
||
## Testing with files | ||
If you need to test with files, then you can add the below to the top of your test class to get access to a temporary | ||
folder to work in. | ||
|
||
```java | ||
@Rule | ||
public TemporaryFolder temporaryFolder = new TemporaryFolder(); | ||
|
||
private Path testStorage; | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
testStorage = temporaryFolder.newFolder("ATLauncherTests").toPath(); | ||
} | ||
``` | ||
|
||
## Is this necessary? | ||
While this isn't necessary, and we won't deny pull requests simply because it's not tested, we generally appreciate any | ||
large changes or any addition of new classes to have tests in order to help us know that everything is running fine. | ||
|
||
If you're not good at writing tests or don't know how (hey we're like that too) then feel free to just not do it, | ||
someone might do it for you at some point. |