Skip to content
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

Merged
merged 7 commits into from
Apr 19, 2017
Merged

Scottmo/integration tests #115

merged 7 commits into from
Apr 19, 2017

Conversation

scottmo
Copy link
Collaborator

@scottmo scottmo commented Apr 15, 2017

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

Added integration tests for polyfill controller.
@scottmo scottmo added the tests label Apr 15, 2017
@scottmo scottmo self-assigned this Apr 15, 2017
@scottmo scottmo requested a review from reiniergs April 15, 2017 01:32
@coveralls
Copy link

Coverage Status

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>
Copy link
Owner

@reiniergs reiniergs Apr 15, 2017

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

Copy link
Collaborator Author

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 ¯_(ツ)_/¯

Copy link
Collaborator Author

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
    ...

Copy link
Owner

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>
Copy link
Owner

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
Copy link
Owner

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

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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";
Copy link
Owner

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)){
//...
}    

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling e4e5919 on scottmo/integrationTests into ** on master**.

Added integration tests for polyfill controller.
…cludes tests in integration-test folder when running unit tests.
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 43bae3d on scottmo/integrationTests into ** on master**.

/**
* Created by smo on 4/16/17.
*/
public final class UA {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UA class added.

@reiniergs reiniergs merged commit 37d832c into master Apr 19, 2017
@scottmo scottmo deleted the scottmo/integrationTests branch April 27, 2017 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Polyfill-as-a-service
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

3 participants