{"id":17006855,"url":"https://github.com/malaskowski/aet-modifier-template","last_synced_at":"2026-04-20T13:03:04.231Z","repository":{"id":168792155,"uuid":"248349651","full_name":"malaskowski/aet-modifier-template","owner":"malaskowski","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-23T09:37:34.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T11:48:11.247Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malaskowski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-18T21:44:30.000Z","updated_at":"2020-04-23T09:37:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ec5f02c-3699-4e6d-a88b-f3e59117bbe0","html_url":"https://github.com/malaskowski/aet-modifier-template","commit_stats":null,"previous_names":["malaskowski/aet-modifier-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/malaskowski/aet-modifier-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malaskowski%2Faet-modifier-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malaskowski%2Faet-modifier-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malaskowski%2Faet-modifier-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malaskowski%2Faet-modifier-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malaskowski","download_url":"https://codeload.github.com/malaskowski/aet-modifier-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malaskowski%2Faet-modifier-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32048445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T05:23:49.275Z","updated_at":"2026-04-20T13:03:04.179Z","avatar_url":"https://github.com/malaskowski.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AET Modifier template\n\nThis repository contains implementation of a sample [AET Modifier](https://github.com/Cognifide/aet/wiki/Modifiers):\n- [Modifier written in Java](https://github.com/Skejven/aet-modifier-template/tree/master/src/main/java/com/github/aet/modifier)\n- [Modifier written in Kotlin](https://github.com/Skejven/aet-modifier-template/tree/master/src/main/kotlin/com/github/aet/modifier)\n\nAET uses Modifiers to achieve certain conditions before collecting the data (e.g. set browser viewport size or wait for some element to appear). \nIn fact, Modifiers are Collectors which use webdriver to perform some actions, bug simply do not collect any data.\n\n## Creating new Modifier\n\nAll AET Modifiers implement [`CollectorJob`](https://github.com/Cognifide/aet/blob/master/api/jobs-api/src/main/java/com/cognifide/aet/job/api/collector/CollectorJob.java)\ninterface. To create a Modifier in AET instance, you will need [`CollectorFactory`](https://github.com/Cognifide/aet/blob/master/api/jobs-api/src/main/java/com/cognifide/aet/job/api/collector/CollectorFactory.java) that provides a new instance of Modifier each time it is required. It also equips Modifier\nwith WebDriver - so that it can interact with the browser.\n\nYou can see the example code in this repository:\n- [Modifier written in Java](https://github.com/Skejven/aet-modifier-template/tree/master/src/main/java/com/github/aet/modifier)\n- [Modifier written in Kotlin](https://github.com/Skejven/aet-modifier-template/tree/master/src/main/kotlin/com/github/aet/modifier)\n\nMore (Java) code examples are in the [AET core Modifiers](https://github.com/Cognifide/aet/tree/master/core/jobs/src/main/java/com/cognifide/aet/job/common/modifiers).\n\n## Repo structure\n\n```\n.\n├── conf\n│   └── com.github.aet.modifier.ExampleModifier.cfg\n├── features\n│   └── kotlin-features.xml\n├── misc\n│   └── suite.xml\n└── src\n    └── main\n        ├── java\n        │   └── com\n        └──  kotlin\n            └── com\n```\n\n- `conf` contains OSGi configuration files for the modifiers\n- `features` contains [Karaf provisioning](https://karaf.apache.org/manual/latest/provisioning) configuration file for `kotlin-osgi-bundle`\n- `misc` contains sample suite that can be use to run the test with sample modifiers\n- `src` contains code of two sample modifiers: `example` (written in Java) and `another` (written in Kotlin), \n together with their factories and configs\n\n## How to develop a custom modifier\n\nChoose one of the options:\n- [download ZIP](https://github.com/Skejven/aet-modifier-template/archive/master.zip)\n- [use this repo as a template](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template)\n\nChoose whether you want to develop a Java or Kotlin version.\nHack the modifier's code, rename it do whatever you need using webdriver.\nRemember to give your modifier a [unique name](https://github.com/Cognifide/aet/blob/master/api/jobs-api/src/main/java/com/cognifide/aet/job/api/collector/CollectorFactory.java#L33).\nWith that name it will be triggered when AET test collection phase is processed, e.g.\n- When you name your component `my-custom-mod` you will call it with `\u003cmy-custom-mod\u003e` from the suite (see the `\u003cexample\u003e` in this repo).\n\nBuild and deploy it following instructions below.\n\n### How to build\n\nRun `./gradlew build`.\n\nThis will produce `jar` in the `build/libs` as well as compress the config file to `build/distributions`.\n\n### How to deploy on local dev environment\n\nRun `./setup.sh`.\nThis script will create `try-me` directory with:\n- latest [AET Docker Example Swarm](https://github.com/Skejven/aet-docker/releases)\n- sample suite with downloaded [AET bash client](https://github.com/Cognifide/aet/tree/master/client/client-scripts) and sample suite\n\nYou will have following structure:\n```\n├── instance\n│   ├── aet-swarm.yml\n│   ├── bundles\n│   ├── configs\n│   ├── features\n│   └── report\n└── tests\n    ├── aet.sh\n    └── suite.xml\n```\n\nTo deploy example modifier run `./deploy.sh` (that will copy the bundle and configs to proper `instance` directories).\n\nRun the AET instance from the `try-me/instance` directory using `docker stack deploy -c aet-swarm.yml aet`.\n\nWhen the instance is up (see details in the [AET Doker instance setup guide](https://github.com/Skejven/aet-docker#instance-setup)) you may run sample suite.\nFrom the `tests` directory run `./aet.sh http://localhost:8181`.\n\nEvery time you change the code/config of the custom module, simply run `./deploy.sh` and wait a moment for the instance to update (changes are auto-discovered by Karaf).\n\n### Tutorial\nTo see a more detailed description on how to use this modifier template, please refer to this article:\n- [Creating a new Modifier in AET](https://tech.cognifide.com/blog/2020/creating-a-new-modifier-in-aet/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalaskowski%2Faet-modifier-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalaskowski%2Faet-modifier-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalaskowski%2Faet-modifier-template/lists"}