-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scottmo/integration tests #115
Conversation
…lias when no features specified.
Added integration tests for polyfill controller.
Changes Unknown when pulling 0642546 on scottmo/integrationTests into ** on master**. |
pom.xml
Outdated
<configuration> | ||
<skipTests>${skip.unit.tests}</skipTests> | ||
<excludes> | ||
<exclude>**/*IT.java</exclude> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use a diff folder just for integration test, or use a folder unit
and a folder integration
with the src/test
. I think is gonna be better for filtering and more scalable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I can try that. The reason I have integration-test and test folders separated for now is because every tutorial is doing that ¯_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm what about putting "integrations" side by side with other tests?:
src/test/
- components
- controllers
- integrations <----
- services
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep it that way, within the integration-test folder.
</profile> | ||
|
||
<profile> | ||
<id>integration-test</id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this profile has to be active when it runs within Travis, let's figure out who detect TravisCI environment :)
path.polyfillsDist=./polyfills/__dist | ||
path.browserBaselines=${path.polyfillsDist}/browserBaselines.json | ||
path.browserAliases=${path.polyfillsDist}/browserAliases.json | ||
path.featureAliases=${path.polyfillsDist}/aliases.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if dev and integration test are active same time, which properties is gonna be set :) ... it's posible tha multiple profiles get active when maven runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. Probably integration's will override dev's. I can run some tests and check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration-test's values override dev's. We shouldn't have both activated tho.
@WebAppConfiguration | ||
public class PolyfillControllerIT { | ||
|
||
private final String UA_CHROME = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3070.0 Safari/537.36"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that we use this kind of string a lot for testing, I was think about use a final class like this
public final class UA {
public static final String UA_CHROME = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3070.0 Safari/537.36";
public static final String UA_FIREFOX = "bar";
}
then we can use it like
import UA.*;
// ...
if(variable.equals(UA_CHROME)){
//...
}
Changes Unknown when pulling e4e5919 on scottmo/integrationTests into ** on master**. |
…lias when no features specified.
Added integration tests for polyfill controller.
…cludes tests in integration-test folder when running unit tests.
…gs/polyfill-service into scottmo/integrationTests
Changes Unknown when pulling 43bae3d on scottmo/integrationTests into ** on master**. |
/** | ||
* Created by smo on 4/16/17. | ||
*/ | ||
public final class UA { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UA class added.
Running integration tests:
mvn verify -Pintegration-test
We should run this command automatically for pull request check.
New maven command options:
-DskipNpm
-DskipDocs
so to make things start up faster, we can do for examples:
mvn jetty:run -DskipNpm -DskipDocs -DskipTests
mvn verify -Pintegration-test -DskipNpm -DskipDocs