{"id":15433462,"url":"https://github.com/pashidlos/visualknight_agent_java_core","last_synced_at":"2025-03-16T17:23:40.398Z","repository":{"id":175626906,"uuid":"254403323","full_name":"pashidlos/visualknight_agent_java_core","owner":"pashidlos","description":"Core wrapper over Visual Knight GraphQL api","archived":false,"fork":false,"pushed_at":"2020-04-10T13:28:41.000Z","size":195,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T08:16:38.802Z","etag":null,"topics":["visual-knight","visual-regression-testing","visual-testing"],"latest_commit_sha":null,"homepage":"","language":"Java","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/pashidlos.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-04-09T15:04:39.000Z","updated_at":"2020-04-17T15:42:34.000Z","dependencies_parsed_at":"2023-09-19T15:46:45.022Z","dependency_job_id":null,"html_url":"https://github.com/pashidlos/visualknight_agent_java_core","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"5d965c54645487c4bff1a01c256f8d9551bf1743"},"previous_names":["pashidlos/visualknight_agent_java_core"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pashidlos%2Fvisualknight_agent_java_core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pashidlos%2Fvisualknight_agent_java_core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pashidlos%2Fvisualknight_agent_java_core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pashidlos%2Fvisualknight_agent_java_core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pashidlos","download_url":"https://codeload.github.com/pashidlos/visualknight_agent_java_core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243903640,"owners_count":20366509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["visual-knight","visual-regression-testing","visual-testing"],"created_at":"2024-10-01T18:34:07.715Z","updated_at":"2025-03-16T17:23:40.320Z","avatar_url":"https://github.com/pashidlos.png","language":"Java","readme":"# Java implementation for [Visual Knight](https://github.com/visual-knight/platform-community-edition) API \nPort from JavaScript implementation [link](https://github.com/visual-knight/libraries/tree/master/packages/core)\n\n## Gradle\n```\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n```\n```\ndependencies {\n    implementation 'com.github.pashidlos:visualknight_agent_java_core:${VERSION}'\n}\n```\n## Maven\n```\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.pashidlos\u003c/groupId\u003e\n    \u003cartifactId\u003evisualknight_agent_java_core\u003c/artifactId\u003e\n    \u003cversion\u003e${VERSION}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n[Available versions](https://github.com/pashidlos/visualknight_agent_java_core/releases)\n\nMore info about https://jitpack.io/\n\n## Usage\n* Setup options object\n```\nVisualKnightOptions visualKnightOptions = VisualKnightOptions.builder()\n    // URL to Visual Knight backend\n    // Required\n    .apiEndpoint(\"http://localhost:3333/graphql\")\n\n    // Your Visual Knight API key\n    // Required\n    .apiKey(\"API_KEY\") \n\n    // Your project name or ID\n    // Required\n    .project(\"PROJECT_KEY_OR_NAME\")\n\n    // The mismatch tolerance for the comparison, 0.01 is 1%\n    // Optional\n    // Default: 0.01\n    .misMatchTolerance(0.01)\n\n    // Accept first testsession for a variation as baseline\n    // Optional\n    // Default: false\n    .autoBaseline(false)\n    .build();\n```\n* Create instance of `VisualKnightCore`\n```\nVisualKnightCore visualKnightCore = new VisualKnightCore(visualKnightOptions);\n```\n* Take a screenshot as String in Base64 format\n```\n// Selenium example\nString screenshotBase64 = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BASE64);\n```\n* Create instance of `VisualKnightCapabilities`\n```\nVisualKnightCapabilities visualKnightCapabilities = VisualKnightCapabilities.builder()\n                // Available: 'Windows', 'Mac OS', `Puppeteer`\n                .os(\"Windows\")\n\n                // Available: 'Internet Explorer', 'Firefox', 'Safari', 'Chrome', 'Opera'\n                .browserName(\"Chrome\")\n                .build()\n```\n* Process image\n```\nvisualKnightCore.processScreenshot(\n        \"Name for test\",\n        screenshotBase64,\n        visualKnightCapabilities\n);\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpashidlos%2Fvisualknight_agent_java_core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpashidlos%2Fvisualknight_agent_java_core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpashidlos%2Fvisualknight_agent_java_core/lists"}