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

Implement initial framework to be able to start developing tests #282

Closed
jordanpadams opened this issue Jan 12, 2021 · 2 comments · Fixed by #293
Closed

Implement initial framework to be able to start developing tests #282

jordanpadams opened this issue Jan 12, 2021 · 2 comments · Fixed by #293
Assignees
Labels

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Jan 12, 2021

This ticket is intended to develop the initial framework for tests and how to create a new one. Each test should contain at least 1 success-oriented test case and at least 1 expected failure test case.

@jordanpadams jordanpadams modified the milestones: PDS.08 (ends 2021-01-27), 01.Florence.Griffith.Joyner Jan 12, 2021
@qchaupds
Copy link
Contributor

The test code for cucumber behavior testing will need to be compiled with:

% mvn package -DskipTests

The -DskipTests is to skip the (normal) existing integration tests.

A file will be created target/validate-1.25.0-SNAPSHOT-bin.zip by the command above and need to be unzipped with:

% cd target
% unzip validate-1.25.0-SNAPSHOT-bin.zip

A directory of .jar files will be created in validate-1.25.0-SNAPSHOT/lib

To run the cucumber testing assuming the version value in pom.xml for artifactId 'validate' is '1.25.0-SNAPSHOT'

% cd ../
% java -cp "target/test-classes:target/validate-1.25.0-SNAPSHOT/lib/*" io.cucumber.core.cli.Main target/test-classes/features

2 Scenarios (2 passed)
8 Steps (8 passed)
0m7.434s

There are currently two tests in the validate.feature feature file in src/test/resources/features directory.
The mvn command will create a copy of it to target/test-classes/features directory.

qchaupds pushed a commit that referenced this issue Jan 28, 2021
…improve error handling for data collection in a sub-directory

1. Add github240 test resources to src/test/resources
2. Add cucumber dependencies to pom.xml
3. Add cucumber feature artifacts to src/test/resources for initial cucumber behavior testing
4. Migrate subset of integration tests to cucumber tests (via the validate.feature file) to new class src/test/java/cucumber/StepDefs.java
5. Change report type to WARNING and message in PDS4Problems.java
6. Add debug to SubdirectoryNamingRule.java

Refs #282 #282 Implement initial framework to be able to start developing tests
     #283 #283 Implement initial test to exercise framework
     #240 #240 RuleUnexpected error for data collection in a sub-directory
     #290 #290 Migrate subset of existing regression tests to cucumber behavioral testing
qchaupds pushed a commit that referenced this issue Feb 2, 2021
…mand line is also available.

1. Add profile 'cucumber-test-run' to allow maven to run cucumber test to pom.xml
2. Add new java class FileFinder.java to search for resource validation-commands.xml
3. Add logic to find validation-commands.xml due to resource null when ran from maven to LocationValidator.java
4. Add logic to find validation-commands.xml due to resource null when ran from maven to ValidationResourceManager.java

Refs #282 #282 Implement initial framework to be able to start developing tests
     #283 #283 Implement initial test to exercise framework
     #240 #240 RuleUnexpected error for data collection in a sub-directory
     #290 #290 Migrate subset of existing regression tests to cucumber behavioral testing
@tloubrieu-jpl
Copy link
Member

This ticket needs a breakout discussion, as integration and cucumber tests need to be un sequentially.

qchaupds pushed a commit that referenced this issue Feb 10, 2021
…amework due to issue with running tests simultaneously.

1. Add test resource to github153 due to cucumber feature does not play well with spaces in file name.
2. Add more enumerated problem types and correct search for "validate#71" to build catalog file in StepDefs.java
3. Migrate all integration tests to validate.feature

Refs #282 #282 Implement initial framework to be able to start developing tests
     #283 #283 Implement initial test to exercise framework
     #240 #240 RuleUnexpected error for data collection in a sub-directory
     #290 #290 Migrate subset of existing regression tests to cucumber behavioral testing
qchaupds pushed a commit that referenced this issue Feb 11, 2021
…pository.

1. Add empty files to 'data', 'browse' and 'calibration' dirctories.
2. Correct message from errors to warnings for "github 240 test 2" to validate.feature

Refs #282 #282 Implement initial framework to be able to start developing tests
     #283 #283 Implement initial test to exercise framework
     #240 #240 RuleUnexpected error for data collection in a sub-directory
     #290 #290 Migrate subset of existing regression tests to cucumber behavioral testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants