├── toughday
├── .gitignore
├── src
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── adobe
│ │ │ └── qe
│ │ │ └── toughday
│ │ │ ├── internal
│ │ │ └── core
│ │ │ │ └── benchmarkmocks
│ │ │ │ ├── MockProxyFromFactory.java
│ │ │ │ ├── MockWorkerSubclass.java
│ │ │ │ ├── MockProxyFactory.java
│ │ │ │ ├── MockProxy.java
│ │ │ │ └── MockDynamicProxyFactory.java
│ │ │ ├── api
│ │ │ └── core
│ │ │ │ └── runnermocks
│ │ │ │ ├── MockThrowable.java
│ │ │ │ ├── MockTestRunner.java
│ │ │ │ └── MockInheritanceTest.java
│ │ │ ├── MockTestTwin.java
│ │ │ ├── mocks
│ │ │ ├── MockRunMap.java
│ │ │ └── MockTest.java
│ │ │ ├── feeders
│ │ │ ├── MockFeederTest2.java
│ │ │ └── MockFeederTest.java
│ │ │ ├── MockTest.java
│ │ │ ├── TestContentPackageIsPresent.java
│ │ │ ├── MockTestRequiredField.java
│ │ │ ├── MockTestTwoRequiredFields.java
│ │ │ └── TestInternalSuiteStructural.java
│ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── adobe
│ │ │ └── qe
│ │ │ └── toughday
│ │ │ ├── internal
│ │ │ └── core
│ │ │ │ ├── config
│ │ │ │ ├── ParserArgHelp.java
│ │ │ │ ├── ConfigurationParser.java
│ │ │ │ ├── ConfigAction.java
│ │ │ │ └── parsers
│ │ │ │ │ └── yaml
│ │ │ │ │ ├── YamlDumpExcludeAction.java
│ │ │ │ │ ├── YamlDumpAction.java
│ │ │ │ │ ├── YamlDumpAddAction.java
│ │ │ │ │ ├── YamlDumpConfigAction.java
│ │ │ │ │ ├── YamlAction.java
│ │ │ │ │ └── YamlParseAction.java
│ │ │ │ ├── SuiteSetup.java
│ │ │ │ └── engine
│ │ │ │ ├── AsyncEngineWorker.java
│ │ │ │ ├── RunMode.java
│ │ │ │ ├── PublishMode.java
│ │ │ │ └── AsyncTestWorker.java
│ │ │ ├── metrics
│ │ │ ├── Failed.java
│ │ │ ├── Skipped.java
│ │ │ ├── Min.java
│ │ │ ├── Passed.java
│ │ │ ├── Max.java
│ │ │ ├── Median.java
│ │ │ ├── StdDev.java
│ │ │ ├── Name.java
│ │ │ ├── RealTP.java
│ │ │ ├── Timestamp.java
│ │ │ ├── Average.java
│ │ │ ├── MetricResultImpl.java
│ │ │ └── Percentile.java
│ │ │ └── Main.java
│ │ └── resources
│ │ └── log4j2.yaml
└── README.md
├── .gitignore
├── aem-td2-core-tests
└── src
│ └── main
│ ├── resources
│ ├── image.png
│ └── document.pdf
│ └── java
│ └── com
│ └── adobe
│ └── qe
│ └── toughday
│ └── tests
│ ├── samplecontent
│ └── SampleContent.java
│ └── sequential
│ ├── GetHomepageTest.java
│ ├── image
│ └── DeleteImageTest.java
│ ├── search
│ └── QueryBuilderTest.java
│ └── GetTest.java
├── toughday_sample
├── jcr_root
│ ├── content
│ │ ├── dam
│ │ │ ├── toughday
│ │ │ │ ├── _jcr_content
│ │ │ │ │ ├── folderThumbnail
│ │ │ │ │ └── folderThumbnail.dir
│ │ │ │ │ │ └── .content.xml
│ │ │ │ ├── fr
│ │ │ │ │ ├── _jcr_content
│ │ │ │ │ │ ├── folderThumbnail
│ │ │ │ │ │ └── folderThumbnail.dir
│ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ ├── ToughDay.jpeg
│ │ │ │ │ │ ├── _jcr_content
│ │ │ │ │ │ │ └── renditions
│ │ │ │ │ │ │ │ ├── original
│ │ │ │ │ │ │ │ ├── cq5dam.thumbnail.48.48.png
│ │ │ │ │ │ │ │ ├── cq5dam.web.1280.1280.jpeg
│ │ │ │ │ │ │ │ ├── cq5dam.thumbnail.140.100.png
│ │ │ │ │ │ │ │ ├── cq5dam.thumbnail.319.319.png
│ │ │ │ │ │ │ │ ├── cq5dam.web.1280.1280.jpeg.dir
│ │ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ │ ├── cq5dam.thumbnail.140.100.png.dir
│ │ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ │ ├── cq5dam.thumbnail.319.319.png.dir
│ │ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ │ ├── cq5dam.thumbnail.48.48.png.dir
│ │ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ │ └── original.dir
│ │ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ └── .content.xml
│ │ │ │ │ └── .content.xml
│ │ │ │ ├── ToughDay.jpeg
│ │ │ │ │ ├── _jcr_content
│ │ │ │ │ │ └── renditions
│ │ │ │ │ │ │ ├── original
│ │ │ │ │ │ │ ├── cq5dam.thumbnail.48.48.png
│ │ │ │ │ │ │ ├── cq5dam.web.1280.1280.jpeg
│ │ │ │ │ │ │ ├── cq5dam.thumbnail.140.100.png
│ │ │ │ │ │ │ ├── cq5dam.thumbnail.319.319.png
│ │ │ │ │ │ │ ├── cq5dam.thumbnail.140.100.png.dir
│ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ ├── cq5dam.thumbnail.319.319.png.dir
│ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ ├── cq5dam.thumbnail.48.48.png.dir
│ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ ├── cq5dam.web.1280.1280.jpeg.dir
│ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ └── original.dir
│ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ └── .content.xml
│ │ │ │ └── .content.xml
│ │ │ └── .content.xml
│ │ ├── toughday
│ │ │ └── .content.xml
│ │ └── .content.xml
│ ├── conf
│ │ ├── toughday-templates
│ │ │ ├── settings
│ │ │ │ ├── wcm
│ │ │ │ │ ├── templates
│ │ │ │ │ │ ├── toughday-template
│ │ │ │ │ │ │ ├── thumbnail.png
│ │ │ │ │ │ │ ├── thumbnail.png.dir
│ │ │ │ │ │ │ │ ├── _jcr_content
│ │ │ │ │ │ │ │ │ └── _dam_thumbnails
│ │ │ │ │ │ │ │ │ │ ├── _dam_thumbnail_48.png
│ │ │ │ │ │ │ │ │ │ ├── _dam_thumbnail_300.png
│ │ │ │ │ │ │ │ │ │ └── _dam_thumbnail_319.png
│ │ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ ├── .content.xml
│ │ │ │ │ │ │ ├── policies
│ │ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ │ └── structure
│ │ │ │ │ │ │ │ └── .content.xml
│ │ │ │ │ │ ├── .content.xml
│ │ │ │ │ │ └── _rep_policy.xml
│ │ │ │ │ ├── .content.xml
│ │ │ │ │ └── policies
│ │ │ │ │ │ └── _rep_policy.xml
│ │ │ │ └── .content.xml
│ │ │ └── .content.xml
│ │ └── .content.xml
│ └── .content.xml
└── META-INF
│ └── vault
│ ├── filter.xml
│ ├── properties.xml
│ └── definition
│ └── .content.xml
├── toughday_tests_sample
├── README.md
├── src
│ └── main
│ │ └── java
│ │ └── com
│ │ └── adobe
│ │ └── qe
│ │ └── toughday
│ │ └── tests
│ │ ├── Worker.java
│ │ ├── EnhancedWorker.java
│ │ ├── WorkerProxyFactory.java
│ │ ├── AEMHello.java
│ │ ├── MyTestRunner.java
│ │ ├── MyTestBase.java
│ │ ├── CompositeHello.java
│ │ └── WorkerProxy.java
└── pom.xml
├── ISSUE_TEMPLATE.md
├── toughday_yaml_configs
├── publish.yaml
└── toughday.yaml
├── toughday2-api
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── adobe
│ │ └── qe
│ │ └── toughday
│ │ ├── internal
│ │ └── core
│ │ │ ├── Timestamp.java
│ │ │ ├── UUIDTestId.java
│ │ │ └── benckmark
│ │ │ └── ImmutableResultInfo.java
│ │ ├── api
│ │ ├── annotations
│ │ │ ├── labels
│ │ │ │ ├── NotNull.java
│ │ │ │ ├── Nullable.java
│ │ │ │ ├── ThreadSafe.java
│ │ │ │ └── NotThreadSafe.java
│ │ │ ├── Tag.java
│ │ │ ├── feeders
│ │ │ │ ├── FeederGet.java
│ │ │ │ └── FeederSet.java
│ │ │ ├── Setup.java
│ │ │ ├── Before.java
│ │ │ ├── Name.java
│ │ │ ├── Description.java
│ │ │ ├── Internal.java
│ │ │ ├── After.java
│ │ │ ├── CloneSetup.java
│ │ │ ├── ConfigArgGet.java
│ │ │ └── ConfigArgSet.java
│ │ ├── feeders
│ │ │ ├── OutputFeeder.java
│ │ │ ├── Feeder.java
│ │ │ └── InputFeeder.java
│ │ ├── core
│ │ │ ├── benchmark
│ │ │ │ ├── signatures
│ │ │ │ │ ├── Callable.java
│ │ │ │ │ ├── VoidCallable.java
│ │ │ │ │ ├── InjectTestResultCallable.java
│ │ │ │ │ └── VoidInjectTestResultCallable.java
│ │ │ │ ├── ResultInfo.java
│ │ │ │ ├── ProxyFactory.java
│ │ │ │ └── Proxy.java
│ │ │ ├── ToughDayException.java
│ │ │ ├── ChildTestFailedException.java
│ │ │ ├── SkippedTestException.java
│ │ │ ├── config
│ │ │ │ └── GlobalArgs.java
│ │ │ ├── SequentialTest.java
│ │ │ ├── NamedObject.java
│ │ │ ├── MetricResult.java
│ │ │ ├── NamedObjectImpl.java
│ │ │ ├── TestId.java
│ │ │ └── AssumptionUtils.java
│ │ └── runners
│ │ │ ├── SequentialTestRunner.java
│ │ │ └── CompositeTestRunner.java
│ │ └── feeders
│ │ ├── IncrementedStringValueFeeder.java
│ │ ├── NoopFeeder.java
│ │ ├── Base64DecoderFeeder.java
│ │ ├── StringValueFeeder.java
│ │ └── ListFeeder.java
│ └── test
│ └── java
│ └── com
│ └── adobe
│ └── qe
│ └── toughday
│ ├── structural
│ ├── TestTDConstraints.java
│ ├── TestConfigGetAnnotatedMethod.java
│ ├── TestFeederClass.java
│ └── TestConstructor.java
│ └── LogFileEraser.java
├── README.md
├── CONTRIBUTING.md
├── pom.xml
├── sling-td2
└── pom.xml
├── sling-td2-tests-parent
└── pom.xml
├── aem-td2-tests-parent
└── pom.xml
└── PULL_REQUEST_TEMPLATE.md
/toughday/.gitignore:
--------------------------------------------------------------------------------
1 | dependency-reduced-pom.xml
2 | .DS_Store*
3 | */.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | *.iml
3 | *.proj
4 | target/
5 | *.class
6 | *.jar
7 | *.log
8 | workspace/
9 | dependency-reduced-pom.xml
10 |
--------------------------------------------------------------------------------
/aem-td2-core-tests/src/main/resources/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/aem-td2-core-tests/src/main/resources/image.png
--------------------------------------------------------------------------------
/aem-td2-core-tests/src/main/resources/document.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/aem-td2-core-tests/src/main/resources/document.pdf
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/_jcr_content/folderThumbnail:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/_jcr_content/folderThumbnail
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/_jcr_content/folderThumbnail:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/fr/_jcr_content/folderThumbnail
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/original:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/original
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/original:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/original
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg
--------------------------------------------------------------------------------
/toughday_sample/META-INF/vault/filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png
--------------------------------------------------------------------------------
/toughday_tests_sample/README.md:
--------------------------------------------------------------------------------
1 | # Running new tests in toughday2
2 |
3 | https://wiki.corp.adobe.com/display/cq5/How+to+create+and+add+extensions+into+ToughDay
4 |
5 | ```
6 | java -jar ToughDay.jar --host=localhost --add pathToJarFile/ExtensionFileName.jar --add MyDemoTest
7 | ```
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Expected Behaviour
2 |
3 | ### Actual Behaviour
4 |
5 | ### Reproduce Scenario (including but not limited to)
6 |
7 | #### Steps to Reproduce
8 |
9 | #### Platform and Version
10 |
11 | #### Sample Code that illustrates the problem
12 |
13 | #### Logs taken while reproducing problem
14 |
--------------------------------------------------------------------------------
/toughday_yaml_configs/publish.yaml:
--------------------------------------------------------------------------------
1 | tests:
2 | - add : GetTest
3 | properties:
4 | name : Get1
5 | path : /
6 | weight : 1
7 | - add : GetTest
8 | properties:
9 | name : Get2
10 | path : /
11 | weight : 1
12 | - add : GetHomepageTest
13 | properties:
14 | weight: 1
15 |
16 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_48.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_300.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_300.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adobe/toughday2/HEAD/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/internal/core/Timestamp.java:
--------------------------------------------------------------------------------
1 | package com.adobe.qe.toughday.internal.core;
2 |
3 | import java.text.SimpleDateFormat;
4 | import java.util.Date;
5 |
6 | public class Timestamp {
7 | public static final String START_TIME = new SimpleDateFormat("yyyy-MM-dd'T'HH-mm").format(new Date());
8 |
9 | private Timestamp() {}
10 | }
11 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/toughday/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/ToughDay.jpeg/_jcr_content/renditions/original.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/thumbnail.png.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/ToughDay.jpeg/_jcr_content/renditions/original.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/fr/_jcr_content/folderThumbnail.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/toughday/_jcr_content/folderThumbnail.dir/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Tough Day 2.0
2 | =============
3 |
4 | Download
5 | ========
6 |
7 | You can download the latest version from: https://repo.adobe.com/nexus/content/repositories/releases/com/adobe/qe/toughday2
8 |
9 | Usage
10 | =====
11 |
12 | https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/tough-day.html
13 | https://github.com/adobe/toughday2/wiki
14 |
15 | Development
16 | ==========
17 |
18 | ## Building
19 | $ __mvn clean package__ (using the reactor pom)
20 |
21 | ## Contributing
22 | PRs and issues are welcome, please reade our [CONTRIBUTING guideline](https://github.com/adobe/toughday2/blob/master/CONTRIBUTING.md).
23 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/labels/NotNull.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations.labels;
13 |
14 | public @interface NotNull {
15 | }
16 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/labels/Nullable.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations.labels;
13 |
14 | public @interface Nullable {
15 | }
16 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/dam/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/labels/ThreadSafe.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations.labels;
13 |
14 | public @interface ThreadSafe {
15 | }
16 |
--------------------------------------------------------------------------------
/toughday/src/test/java/com/adobe/qe/toughday/internal/core/benchmarkmocks/MockProxyFromFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.benchmarkmocks;
13 |
14 | public class MockProxyFromFactory extends MockProxy {
15 | }
16 |
--------------------------------------------------------------------------------
/toughday/src/test/java/com/adobe/qe/toughday/internal/core/benchmarkmocks/MockWorkerSubclass.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.benchmarkmocks;
13 |
14 |
15 | public class MockWorkerSubclass extends MockWorker {
16 | }
17 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/labels/NotThreadSafe.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations.labels;
13 |
14 | public @interface NotThreadSafe {
15 | String description() default "";
16 | }
17 |
--------------------------------------------------------------------------------
/toughday_sample/META-INF/vault/properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | FileVault Package Properties
5 | admin
6 | toughday_sample
7 | 2016-12-19T15:46:55.529+02:00
8 | admin
9 | 2016-12-19T15:46:55.891+02:00
10 | 2
11 | 2.0
12 |
13 | 2
14 |
15 | 2016-12-19T15:46:55.529+02:00
16 | com.adobe.qe.toughday
17 | admin
18 |
19 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/feeders/OutputFeeder.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2018 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.feeders;
13 |
14 | public interface OutputFeeder extends Feeder {
15 | void push(T item, Object... keys) throws Exception;
16 | }
17 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/benchmark/signatures/Callable.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core.benchmark.signatures;
13 |
14 | @FunctionalInterface
15 | public interface Callable {
16 | T call() throws Throwable;
17 | }
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/benchmark/signatures/VoidCallable.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core.benchmark.signatures;
13 |
14 | @FunctionalInterface
15 | public interface VoidCallable {
16 | void call() throws Throwable;
17 | }
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/config/ParserArgHelp.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.config;
13 |
14 | public interface ParserArgHelp {
15 | String name();
16 | String defaultValue();
17 | String description();
18 | }
19 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/SuiteSetup.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core;
13 |
14 | /**
15 | * Common interface for all Suite setup steps.
16 | */
17 | public interface SuiteSetup {
18 | void setup() throws Exception;
19 | }
20 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/feeders/Feeder.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2018 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.feeders;
13 |
14 | import com.adobe.qe.toughday.api.core.NamedObject;
15 |
16 | public interface Feeder extends NamedObject {
17 | void init() throws Exception;
18 | }
19 |
--------------------------------------------------------------------------------
/toughday/src/test/java/com/adobe/qe/toughday/api/core/runnermocks/MockThrowable.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core.runnermocks;
13 |
14 | public class MockThrowable extends Throwable {
15 | public MockThrowable(String message) {
16 | super(message);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/toughday-template/policies/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/config/ConfigurationParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.config;
13 |
14 | /**
15 | * Common interface for all parsers.
16 | */
17 | public interface ConfigurationParser {
18 | ConfigParams parse(String[] cmdLineArgs);
19 | }
20 |
--------------------------------------------------------------------------------
/toughday_tests_sample/src/main/java/com/adobe/qe/toughday/tests/Worker.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.tests;
13 |
14 | public class Worker {
15 | public long doWork() throws Throwable { return doWork(40); }
16 | public long doWork(long millis) throws Throwable { Thread.sleep(millis); return millis; }
17 | }
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/feeders/InputFeeder.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2018 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.feeders;
13 |
14 | import com.adobe.qe.toughday.api.annotations.labels.Nullable;
15 |
16 | public interface InputFeeder extends Feeder {
17 | @Nullable T get(Object... keys) throws Exception;
18 | }
19 |
--------------------------------------------------------------------------------
/toughday2-api/src/test/java/com/adobe/qe/toughday/structural/TestTDConstraints.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.structural;
13 |
14 | /**
15 | * We use this class for defining a category of tests that should be runned when users try to create their own extension jar file.
16 | */
17 |
18 | public class TestTDConstraints {
19 | }
20 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/policies/_rep_policy.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
12 |
16 |
20 |
21 |
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/conf/toughday-templates/settings/wcm/templates/_rep_policy.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
12 |
16 |
20 |
21 |
--------------------------------------------------------------------------------
/toughday_tests_sample/src/main/java/com/adobe/qe/toughday/tests/EnhancedWorker.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.tests;
13 |
14 | public class EnhancedWorker extends Worker {
15 | public long muchWork(long millis) throws Throwable {
16 | doWork(millis);
17 | System.out.println("I am exhausted!");
18 | return millis;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/toughday_tests_sample/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 |
4 |
5 | com.adobe.qe
6 | aem-td2-tests-parent
7 | 0.9.3-SNAPSHOT
8 | ../aem-td2-tests-parent/pom.xml
9 |
10 |
11 | com.adobe.qe
12 | toughday2-tests-sample
13 | jar
14 | 0.1.0-SNAPSHOT
15 |
16 |
17 |
18 | Apache License, Version 2.0
19 | https://www.apache.org/licenses/LICENSE-2.0.txt
20 | repo
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/benchmark/signatures/InjectTestResultCallable.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core.benchmark.signatures;
13 |
14 | import com.adobe.qe.toughday.api.core.benchmark.TestResult;
15 |
16 | @FunctionalInterface
17 | public interface InjectTestResultCallable {
18 | T call(TestResult testResult) throws Throwable;
19 | }
--------------------------------------------------------------------------------
/toughday_sample/jcr_root/content/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/config/ConfigAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.config;
13 |
14 | import java.util.Map;
15 |
16 | public interface ConfigAction {
17 | String value();
18 | void apply(ConfigParams configParams, String identifier, Map metaInfo);
19 | String actionParams();
20 | String actionDescription();
21 | }
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/benchmark/signatures/VoidInjectTestResultCallable.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core.benchmark.signatures;
13 |
14 | import com.adobe.qe.toughday.api.core.benchmark.TestResult;
15 |
16 | @FunctionalInterface
17 | public interface VoidInjectTestResultCallable {
18 | void call(TestResult testResult) throws Throwable;
19 | }
20 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/Tag.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | @Retention(RetentionPolicy.RUNTIME)
20 | @Target(value = ElementType.TYPE)
21 | public @interface Tag {
22 | String[] tags() default {};
23 | }
24 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/feeders/FeederGet.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2018 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations.feeders;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | @Retention(RetentionPolicy.RUNTIME)
20 | @Target(value = ElementType.METHOD)
21 | public @interface FeederGet {
22 | String desc() default "";
23 | }
24 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/ToughDayException.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core;
13 |
14 | /**
15 | * Generic ToughDay exception.
16 | */
17 | public class ToughDayException extends Exception {
18 | public ToughDayException(String message, Throwable throwable) {
19 | super(message, throwable);
20 | }
21 |
22 | public ToughDayException(Throwable throwable) {
23 | super(throwable.getMessage(), throwable);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/ChildTestFailedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core;
13 |
14 | /**
15 | * Exception for failing composite tests in case a child test fails.
16 | */
17 | public class ChildTestFailedException extends ToughDayException {
18 | public ChildTestFailedException(String message, Throwable e) { super(message, e);}
19 |
20 | public ChildTestFailedException(Throwable e) {
21 | super(e.getMessage(), e);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/Setup.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | /**
20 | * Hook for doing some setup work before the test clones are created.
21 | */
22 | @Retention(RetentionPolicy.RUNTIME)
23 | @Target(value = ElementType.METHOD)
24 | public @interface Setup {
25 | }
26 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/Before.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | /**
20 | * Annotation for executing a method before each run of a test.
21 | */
22 | @Retention(RetentionPolicy.RUNTIME)
23 | @Target(value = ElementType.METHOD)
24 | public @interface Before {
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/toughday_yaml_configs/toughday.yaml:
--------------------------------------------------------------------------------
1 | globals:
2 | port : 4502
3 |
4 | runmode:
5 | type : normal
6 | waittime : 300
7 | concurrency : 200
8 |
9 | publishmode:
10 | type : simple
11 |
12 | tests:
13 | - add : CreateLiveCopyTreeTest
14 | properties :
15 | name : CreateLiveCopy
16 | weight : 5
17 | base : 5
18 | sourcepagetitle : IAmAPage
19 |
20 | - add : CreateAssetTreeTest
21 | properties :
22 | name : UploadAsset
23 | weight : 5
24 | base : 3
25 | foldertitle : IAmAFolder
26 | assettitle : IAmAnAsset
27 |
28 | - add : DeleteImageTest
29 | properties :
30 | name : DeleteAsset
31 | weight : 5
32 |
33 | - add : QueryBuilderTest
34 | properties :
35 | name : Query
36 | weight : 10
37 | query : type=nt:unstructured&group.1_path=/libs&orderby=@jcr:score&orderby.sort=desc
38 |
39 | - add : GetHomepageTest
40 | properties :
41 | name : GetHomepage
42 | weight : 75
43 |
44 | publishers:
45 | - add : ConsolePublisher
46 | - add : CSVPublisher
47 | properties :
48 | filepath : my_results.csv
49 | append : true
50 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/Name.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 |
20 | @Retention(RetentionPolicy.RUNTIME)
21 | @Target(value = ElementType.TYPE)
22 | public @interface Name {
23 | /**
24 | * The name of the test class
25 | * @return
26 | */
27 | String name();
28 | }
29 |
--------------------------------------------------------------------------------
/aem-td2-core-tests/src/main/java/com/adobe/qe/toughday/tests/samplecontent/SampleContent.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.tests.samplecontent;
13 |
14 | public class SampleContent {
15 |
16 | public static final String TOUGHDAY_TEMPLATE = "/conf/toughday-templates/settings/wcm/templates/toughday-template";
17 | public static final String TOUGHDAY_SITE = "/content/toughday";
18 | public static final String TOUGHDAY_DAM_FOLDER = "/content/dam/toughday";
19 |
20 | private SampleContent() {
21 | //no-op
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/Description.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | @Retention(RetentionPolicy.RUNTIME)
20 | @Target({ElementType.TYPE})
21 | public @interface Description {
22 | /**
23 | * The text description of the class
24 | * @return
25 | */
26 | String desc();
27 | }
28 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/Internal.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | /**
20 | * Annotation for classes that need to be excluded from the CLI help. Currently supported: tests and publishers.
21 | */
22 | @Retention(RetentionPolicy.RUNTIME)
23 | @Target(value = ElementType.TYPE)
24 | public @interface Internal {
25 | }
26 |
--------------------------------------------------------------------------------
/toughday_tests_sample/src/main/java/com/adobe/qe/toughday/tests/WorkerProxyFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.tests;
13 |
14 | import com.adobe.qe.toughday.api.core.AbstractTest;
15 | import com.adobe.qe.toughday.api.core.benchmark.Benchmark;
16 | import com.adobe.qe.toughday.api.core.benchmark.ProxyFactory;
17 |
18 | public class WorkerProxyFactory implements ProxyFactory {
19 | @Override
20 | public Worker createProxy(Worker target, AbstractTest test, Benchmark benchmark) {
21 | return new WorkerProxy("Such info!");
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/feeders/IncrementedStringValueFeeder.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2018 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.feeders;
13 |
14 | import java.util.concurrent.atomic.AtomicLong;
15 |
16 | public class IncrementedStringValueFeeder extends StringValueFeeder {
17 | private AtomicLong current = new AtomicLong(0);
18 |
19 | @Override
20 | public String get(Object... keys) throws Exception {
21 | return super.get() + current.getAndIncrement();
22 | }
23 |
24 | @Override
25 | public void init() throws Exception {
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/toughday_tests_sample/src/main/java/com/adobe/qe/toughday/tests/AEMHello.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.tests;
13 |
14 | import com.adobe.qe.toughday.api.core.AbstractTest;
15 | import com.adobe.qe.toughday.tests.sequential.AEMTestBase;
16 |
17 | public class AEMHello extends AEMTestBase {
18 | @Override
19 | public void test() throws Throwable {
20 | benchmark().measure(this, "CRXDE", getDefaultClient()).doGet("/crx/de");
21 | }
22 |
23 | @Override
24 | public AbstractTest newInstance() {
25 | return new AEMHello();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/feeders/FeederSet.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2018 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations.feeders;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | @Retention(RetentionPolicy.RUNTIME)
20 | @Target(value = ElementType.METHOD)
21 | public @interface FeederSet {
22 | boolean required() default true;
23 | String desc() default "";
24 | boolean allowNoopReplacement() default true;
25 | }
26 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/SkippedTestException.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core;
13 |
14 | /**
15 | * Exception for skipping tests in case a dependency test failed/was not executed.
16 | */
17 | public class SkippedTestException extends ToughDayException {
18 | public SkippedTestException(Throwable e) {
19 | super(e.getMessage(), e);
20 | }
21 |
22 | public SkippedTestException(String message, Throwable e) {
23 | super(message, e);
24 | }
25 |
26 | public SkippedTestException(String message) { super(message, null); }
27 | }
28 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Thanks for choosing to contribute!
4 |
5 | The following are a set of guidelines to follow when contributing to this project.
6 |
7 | ## Code Of Conduct
8 |
9 | This project adheres to the Adobe [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [Grp-AEM-ToughDay@adobe.com](mailto:Grp-AEM-ToughDay@adobe.com).
10 |
11 | ## Contributor License Agreement
12 |
13 | All third-party contributions to this project must be accompanied by a signed contributor license agreement. This gives Adobe permission to redistribute your contributions as part of the project. [Sign our CLA](http://opensource.adobe.com/cla.html). You only need to submit an Adobe CLA one time, so if you have submitted one previously, you are good to go!
14 |
15 | ## Code Reviews
16 |
17 | All submissions should come in the form of pull requests and need to be reviewed by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/) for more information on sending pull requests.
18 |
19 | Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when submitting a pull request!
20 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/After.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | /**
20 | * Annotation for executing a method after each run of a test.
21 | * The method is guaranteed to be called even if the test fails and Exceptions are thrown.
22 | */
23 | @Retention(RetentionPolicy.RUNTIME)
24 | @Target(value = ElementType.METHOD)
25 | public @interface After {
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/engine/AsyncEngineWorker.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.engine;
13 |
14 | /**
15 | * Base class for all async workers in engine.
16 | */
17 | public abstract class AsyncEngineWorker implements Runnable {
18 | private boolean finish = false;
19 |
20 | /**
21 | * Method for correctly shutting down a worker.
22 | */
23 | public void finishExecution() {
24 | finish = true;
25 | }
26 |
27 | /**
28 | * Method for checking if a worker has finished.
29 | */
30 | public boolean isFinished() { return finish; }
31 | }
32 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/benchmark/ResultInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core.benchmark;
13 |
14 | import com.adobe.qe.toughday.api.annotations.labels.Nullable;
15 |
16 | /**
17 | * A wrapper over the outcome of a test run.
18 | */
19 | public interface ResultInfo {
20 | /**
21 | * The {@link TestResult} generated
22 | */
23 | TestResult getTestResult();
24 |
25 | /**
26 | * (Optional) The return value
27 | */
28 | @Nullable R getReturnValue();
29 |
30 | /**
31 | * Any throwable that might have occurred
32 | */
33 | @Nullable Throwable getThrowable();
34 | }
35 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/config/parsers/yaml/YamlDumpExcludeAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.config.parsers.yaml;
13 |
14 |
15 | import com.adobe.qe.toughday.internal.core.config.Actions;
16 |
17 | /**
18 | * Specifies how the exclude action is dumped when generating a yaml configuration file.
19 | */
20 | public class YamlDumpExcludeAction extends YamlDumpAction {
21 |
22 | public YamlDumpExcludeAction(String identifier) {
23 | this.action = Actions.EXCLUDE;
24 | this.identifier = identifier;
25 | }
26 |
27 | public String getExclude() {
28 | return identifier;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Failed.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 |
17 | @Description(desc = "Number of fails.")
18 | public class Failed extends Metric {
19 |
20 | @Override
21 | public Object getValue(RunMap.TestStatistics testStatistics) {
22 | return testStatistics.getFailRuns();
23 | }
24 |
25 | @Override
26 | public String getFormat() {
27 | return "%d";
28 | }
29 |
30 | @Override
31 | public String getUnitOfMeasure() {
32 | return "";
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Skipped.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 |
17 | @Description(desc = "Number of skipped runs.")
18 | public class Skipped extends Metric {
19 | @Override
20 | public Object getValue(RunMap.TestStatistics testStatistics) {
21 | return testStatistics.getSkippedRuns();
22 | }
23 |
24 | @Override
25 | public String getFormat() {
26 | return "%d";
27 | }
28 |
29 | @Override
30 | public String getUnitOfMeasure() {
31 | return "";
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/engine/RunMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.engine;
13 |
14 | import com.adobe.qe.toughday.api.core.RunMap;
15 |
16 | import java.util.Collection;
17 | import java.util.concurrent.ExecutorService;
18 |
19 | public interface RunMode {
20 | void runTests(Engine engine) throws Exception;
21 | void finishExecutionAndAwait();
22 | ExecutorService getExecutorService();
23 | RunContext getRunContext();
24 |
25 | interface RunContext {
26 | Collection getTestWorkers();
27 | Collection getRunMaps();
28 | boolean isRunFinished();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Min.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 |
17 | @Description(desc = "Lowest duration of test execution.")
18 | public class Min extends Metric {
19 |
20 | @Override
21 | public Object getValue(RunMap.TestStatistics testStatistics) {
22 | return testStatistics.getMinDuration();
23 | }
24 |
25 | @Override
26 | public String getFormat() {
27 | return "%d";
28 | }
29 |
30 | @Override
31 | public String getUnitOfMeasure() {
32 | return "ms";
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Passed.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 |
17 | @Description(desc = "Number of successful runs.")
18 | public class Passed extends Metric {
19 |
20 | @Override
21 | public Object getValue(RunMap.TestStatistics testStatistics) {
22 | return testStatistics.getTotalRuns();
23 | }
24 |
25 | @Override
26 | public String getFormat() {
27 | return "%d";
28 | }
29 |
30 | @Override
31 | public String getUnitOfMeasure() {
32 | return "";
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 | com.adobe.qe
5 | toughday2.reactor
6 | pom
7 | 0.1.0-SNAPSHOT
8 |
9 |
10 |
11 | Apache License, Version 2.0
12 | https://www.apache.org/licenses/LICENSE-2.0.txt
13 | repo
14 |
15 |
16 |
17 |
18 | scm:git:git@github.com:adobe/toughday2.git
19 | scm:git:git@github.com:adobe/toughday2.git
20 | https://github.com/adobe/toughday2/
21 | HEAD
22 |
23 |
24 |
25 | toughday2-api
26 | toughday2-tests-parent
27 | sling-td2
28 | sling-td2-tests-parent
29 | aem-td2-core-tests
30 | toughday_sample
31 | toughday
32 | aem-td2-tests-parent
33 | toughday_tests_sample
34 |
35 |
36 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Max.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 |
17 | @Description(desc = "Highest duration of test execution.")
18 | public class Max extends Metric {
19 |
20 | @Override
21 | public Object getValue(RunMap.TestStatistics testStatistics) {
22 | return testStatistics.getMaxDuration();
23 | }
24 |
25 | @Override
26 | public String getFormat() {
27 | return "%d";
28 | }
29 |
30 | @Override
31 | public String getUnitOfMeasure() {
32 | return "ms";
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/config/parsers/yaml/YamlDumpAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.config.parsers.yaml;
13 |
14 | import com.adobe.qe.toughday.internal.core.config.Actions;
15 |
16 | import java.util.HashMap;
17 | import java.util.Map;
18 |
19 | public abstract class YamlDumpAction {
20 |
21 | protected Map properties = new HashMap<>();
22 | protected String identifier;
23 | protected Actions action;
24 |
25 | public void setProperties(Map properties) {
26 | this.properties = properties;
27 | }
28 |
29 | public Map getProperties() {
30 | return properties;
31 | }
32 | }
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Median.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 |
17 | @Description(desc = "Computed median duration of all test executions.")
18 | public class Median extends Metric{
19 |
20 | @Override
21 | public Object getValue(RunMap.TestStatistics testStatistics) {
22 | return testStatistics.getMedianDuration();
23 | }
24 |
25 | @Override
26 | public String getFormat() {
27 | return "%d";
28 | }
29 |
30 | @Override
31 | public String getUnitOfMeasure() {
32 | return "ms";
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/StdDev.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 |
17 | @Description(desc = "Standard deviation.")
18 | public class StdDev extends Metric {
19 |
20 | @Override
21 | public Object getValue(RunMap.TestStatistics testStatistics) {
22 | return testStatistics.getStandardDeviation();
23 | }
24 |
25 | @Override
26 | public String getFormat() {
27 | return "%." + this.getDecimals() + "f";
28 | }
29 |
30 | @Override
31 | public String getUnitOfMeasure() {
32 | return "ms";
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/config/GlobalArgs.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core.config;
13 |
14 | import org.apache.logging.log4j.Level;
15 |
16 | public interface GlobalArgs {
17 | long getDuration();
18 | long getTimeout();
19 | String getHost();
20 | int getPort();
21 | String getUser();
22 | String getPassword();
23 | String getProtocol();
24 | String getAuthMethod();
25 | boolean getInstallSampleContent();
26 | String getContextPath();
27 | Level getLogLevel();
28 | boolean getDryRun();
29 | boolean getSaveConfig();
30 | boolean getShowSteps();
31 | boolean getHostValidationEnabled();
32 | String getLogPath();
33 | }
34 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/CloneSetup.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | /**
20 | * Annotation for executing a method once before any runs of any replication (clone) of a test.
21 | * Guaranteed to be executed only once, no matter how many threads have a replica of the test.
22 | *
23 | * @deprecated use {@link Setup} instead
24 | */
25 | @Deprecated
26 | @Retention(RetentionPolicy.RUNTIME)
27 | @Target(value = ElementType.METHOD)
28 | public @interface CloneSetup {
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/SequentialTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core;
13 |
14 | import com.adobe.qe.toughday.api.runners.SequentialTestRunner;
15 |
16 | import java.util.ArrayList;
17 | import java.util.List;
18 |
19 | public abstract class SequentialTest extends AbstractTest {
20 | private static final List noChildren = new ArrayList<>();
21 |
22 | @Override
23 | public List getChildren() {
24 | return noChildren;
25 | }
26 |
27 | @Override
28 | public Class extends AbstractTestRunner> getTestRunnerClass() {
29 | return SequentialTestRunner.class;
30 | }
31 |
32 | public abstract void test() throws Throwable;
33 | }
34 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/config/parsers/yaml/YamlDumpAddAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.config.parsers.yaml;
13 |
14 | import com.adobe.qe.toughday.internal.core.config.Actions;
15 |
16 | import java.util.Map;
17 |
18 | /**
19 | * Specifies how the add action is dumped when generating a yaml configuration file.
20 | */
21 | public class YamlDumpAddAction extends YamlDumpAction {
22 |
23 | public YamlDumpAddAction(String identifier, Map properties) {
24 | this.action = Actions.ADD;
25 | this.identifier = identifier;
26 | this.properties = properties;
27 | }
28 |
29 | public String getAdd() {
30 | return identifier;
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Name.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 | import com.adobe.qe.toughday.api.annotations.Internal;
17 |
18 | @Internal
19 | @Description(desc = "The name of the test.")
20 | public class Name extends Metric {
21 |
22 | @Override
23 | public Object getValue(RunMap.TestStatistics testStatistics) {
24 | return testStatistics.getTest().getFullName();
25 | }
26 |
27 | @Override
28 | public String getFormat() {
29 | return "%s";
30 | }
31 |
32 | @Override
33 | public String getUnitOfMeasure() {
34 | return "";
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/annotations/ConfigArgGet.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.annotations;
13 |
14 | import java.lang.annotation.ElementType;
15 | import java.lang.annotation.Retention;
16 | import java.lang.annotation.RetentionPolicy;
17 | import java.lang.annotation.Target;
18 |
19 | /**
20 | * Use this annotation on a getter to expose it as a configuration property.
21 | * These properties will be automatically picked up, shown in logging or in "dry" runmode
22 | * Supported classes: subtypes of AbstractTest, subtypes of Publisher and
23 | * GlobalArgs.
24 | */
25 | @Retention(RetentionPolicy.RUNTIME)
26 | @Target(value = ElementType.METHOD)
27 | public @interface ConfigArgGet {
28 | String name() default "";
29 | }
30 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/internal/core/config/parsers/yaml/YamlDumpConfigAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.internal.core.config.parsers.yaml;
13 |
14 | import com.adobe.qe.toughday.internal.core.config.Actions;
15 |
16 | import java.util.Map;
17 |
18 | /**
19 | * Specifies how the config action is dumped when generating a yaml configuration file.
20 | */
21 | public class YamlDumpConfigAction extends YamlDumpAction {
22 |
23 | public YamlDumpConfigAction(String identifier, Map properties) {
24 | this.action = Actions.CONFIG;
25 | this.identifier = identifier;
26 | this.properties = properties;
27 | }
28 |
29 | public String getConfig() {
30 | return identifier;
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/RealTP.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 |
17 | @Description(desc = "Number of runs divided by elapsed time. Formula: Runs / elapsed execution time.")
18 | public class RealTP extends Metric {
19 |
20 | @Override
21 | public Object getValue(RunMap.TestStatistics testStatistics) {
22 | return testStatistics.getRealThroughput();
23 | }
24 |
25 | @Override
26 | public String getFormat() {
27 | return "%." + this.getDecimals() + "f";
28 | }
29 |
30 | @Override
31 | public String getUnitOfMeasure() {
32 | return "rps";
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/toughday/src/test/java/com/adobe/qe/toughday/MockTestTwin.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday;
13 |
14 | import com.adobe.qe.toughday.api.core.AbstractTest;
15 | import com.adobe.qe.toughday.api.core.AbstractTestRunner;
16 |
17 | import java.util.ArrayList;
18 | import java.util.List;
19 |
20 | public class MockTestTwin extends AbstractTest {
21 | private List noChildren = new ArrayList<>();
22 |
23 | @Override
24 | public List getChildren() {
25 | return noChildren;
26 | }
27 |
28 | @Override
29 | public Class extends AbstractTestRunner> getTestRunnerClass() {
30 | return null;
31 | }
32 |
33 | @Override
34 | public AbstractTest newInstance() {
35 | return null;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/NamedObject.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core;
13 |
14 | import com.adobe.qe.toughday.api.annotations.ConfigArgGet;
15 | import com.adobe.qe.toughday.api.annotations.ConfigArgSet;
16 | import com.adobe.qe.toughday.api.annotations.labels.NotNull;
17 |
18 | /**
19 | * As Annotations from Interfaces are not inherited in Java, you'll have to add similar annotations to your implementation.\
20 | * If your implementation allows this, you can extend {@link NamedObjectImpl} for convenience
21 | */
22 | public interface NamedObject {
23 | @ConfigArgGet
24 | @NotNull String getName();
25 |
26 | @ConfigArgSet(required = false, desc = "The name of this object")
27 | void setName(String name);
28 | }
29 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Timestamp.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 | import com.adobe.qe.toughday.api.annotations.Description;
15 | import com.adobe.qe.toughday.api.core.RunMap;
16 | import com.adobe.qe.toughday.api.annotations.Internal;
17 |
18 | @Internal
19 | @Description(desc = "Timestamp of the last finished test run.")
20 | public class Timestamp extends Metric {
21 |
22 | @Override
23 | public Object getValue(RunMap.TestStatistics testStatistics) {
24 | return testStatistics.getTimestamp();
25 | }
26 |
27 | @Override
28 | public String getFormat() {
29 | return "%s";
30 | }
31 |
32 | @Override
33 | public String getUnitOfMeasure() {
34 | return "";
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/MetricResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core;
13 |
14 | public interface MetricResult {
15 |
16 | /**
17 | * Getter for the name of the metric.
18 | * @return
19 | */
20 | String getName();
21 |
22 | /**
23 | * Getter for the value of this metric.
24 | */
25 | T getValue();
26 |
27 |
28 | /**
29 | * Getter for the format of the result of this metric. For instance, if this metric is going to return a string as
30 | * a result, this method should return "%s".
31 | */
32 | String getFormat();
33 |
34 | /**
35 | * Getter fot the unit of measure for the value of this metric.
36 | */
37 | String getUnitOfMeasure();
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/toughday/src/main/java/com/adobe/qe/toughday/metrics/Average.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.metrics;
13 |
14 |
15 | import com.adobe.qe.toughday.api.annotations.Description;
16 | import com.adobe.qe.toughday.api.core.RunMap;
17 |
18 | @Description(desc = "Computed average duration of all test executions. Formula: Sum (request time) / Runs .")
19 | public class Average extends Metric {
20 |
21 | @Override
22 | public Object getValue(RunMap.TestStatistics testStatistics) {
23 | return testStatistics.getAverageDuration();
24 | }
25 |
26 | @Override
27 | public String getFormat() {
28 | return "%." + this.getDecimals() + "f";
29 | }
30 |
31 | @Override
32 | public String getUnitOfMeasure() {
33 | return "ms";
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/toughday_tests_sample/src/main/java/com/adobe/qe/toughday/tests/MyTestRunner.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.tests;
13 |
14 | import com.adobe.qe.toughday.api.core.AbstractTest;
15 | import com.adobe.qe.toughday.api.core.AbstractTestRunner;
16 | import com.adobe.qe.toughday.api.core.RunMap;
17 |
18 |
19 | public class MyTestRunner extends AbstractTestRunner {
20 |
21 | public MyTestRunner(Class extends AbstractTest> testClass) {
22 | super(testClass);
23 | }
24 |
25 | @Override
26 | protected void run(MyTestBase testObject, RunMap runMap) throws Throwable {
27 | for(int i = 0; i < 10; i++) {
28 | testObject.benchmark().measure(testObject, () -> {
29 | testObject.myTest();
30 | });
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/toughday_sample/META-INF/vault/definition/.content.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
24 |
29 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/toughday/src/test/java/com/adobe/qe/toughday/mocks/MockRunMap.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.mocks;
13 |
14 |
15 | import com.adobe.qe.toughday.api.core.AbstractTest;
16 | import com.adobe.qe.toughday.api.core.RunMap;
17 | import com.adobe.qe.toughday.api.core.benchmark.TestResult;
18 |
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | public class MockRunMap implements RunMap {
23 | private List results = new ArrayList<>();
24 |
25 | @Override
26 | public void record(TestResult testResult) {
27 | results.add(testResult);
28 | }
29 |
30 | public List getResults() {
31 | return results;
32 | }
33 |
34 | @Override
35 | public TestStatistics getRecord(AbstractTest test) {
36 | return null;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/aem-td2-core-tests/src/main/java/com/adobe/qe/toughday/tests/sequential/GetHomepageTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.tests.sequential;
13 |
14 | import com.adobe.qe.toughday.api.core.AbstractTest;
15 | import com.adobe.qe.toughday.api.annotations.Description;
16 | import com.adobe.qe.toughday.api.annotations.Tag;
17 | import org.apache.http.HttpStatus;
18 |
19 | @Tag(tags = { "author", "publish" })
20 | @Description(desc = "GET the home page.")
21 | public class GetHomepageTest extends AEMTestBase {
22 |
23 | @Override
24 | public void test() throws Throwable {
25 | benchmark().measure(this, "GET Homepage", getDefaultClient()).doGet("/", HttpStatus.SC_OK);
26 | }
27 |
28 | @Override
29 | public AbstractTest newInstance() {
30 | return new GetHomepageTest();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/api/core/NamedObjectImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.api.core;
13 |
14 | import com.adobe.qe.toughday.api.annotations.ConfigArgGet;
15 | import com.adobe.qe.toughday.api.annotations.ConfigArgSet;
16 |
17 | /**
18 | * An extendable implementation of {@link NamedObject}
19 | */
20 | public class NamedObjectImpl implements NamedObject {
21 | private String name;
22 |
23 | public NamedObjectImpl() {
24 | this.name = this.getClass().getSimpleName();
25 | }
26 |
27 | @ConfigArgGet
28 | @Override
29 | public String getName() {
30 | return this.name;
31 | }
32 | @ConfigArgSet(required = false, desc = "The name of this object")
33 | @Override
34 | public void setName(String name) {
35 | this.name = name;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/toughday_tests_sample/src/main/java/com/adobe/qe/toughday/tests/MyTestBase.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2015 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.tests;
13 |
14 | import com.adobe.qe.toughday.api.core.AbstractTest;
15 | import com.adobe.qe.toughday.api.core.AbstractTestRunner;
16 |
17 | import java.util.ArrayList;
18 | import java.util.List;
19 |
20 | public abstract class MyTestBase extends AbstractTest {
21 | private static final List EMPTY_LIST = new ArrayList<>();
22 |
23 | @Override
24 | public List getChildren() {
25 | return EMPTY_LIST;
26 | }
27 |
28 | @Override
29 | public Class extends AbstractTestRunner> getTestRunnerClass() {
30 | return MyTestRunner.class;
31 | }
32 |
33 | @Override
34 | public abstract AbstractTest newInstance();
35 |
36 | public abstract void myTest() throws Throwable;
37 | }
38 |
--------------------------------------------------------------------------------
/toughday2-api/src/main/java/com/adobe/qe/toughday/feeders/NoopFeeder.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2018 Adobe. All rights reserved.
3 | This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License. You may obtain a copy
5 | of the License at http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | Unless required by applicable law or agreed to in writing, software distributed under
8 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 | OF ANY KIND, either express or implied. See the License for the specific language
10 | governing permissions and limitations under the License.
11 | */
12 | package com.adobe.qe.toughday.feeders;
13 |
14 | import com.adobe.qe.toughday.api.core.NamedObjectImpl;
15 | import com.adobe.qe.toughday.api.feeders.InputFeeder;
16 | import com.adobe.qe.toughday.api.feeders.OutputFeeder;
17 |
18 | public final class NoopFeeder extends NamedObjectImpl implements InputFeeder