{"id":16374026,"url":"https://github.com/hiptest/hps-java-junit-selenium","last_synced_at":"2025-04-15T21:33:45.243Z","repository":{"id":32518849,"uuid":"101624688","full_name":"hiptest/hps-java-junit-selenium","owner":"hiptest","description":"Coffee machine, web version, tested with Java + Selenium","archived":false,"fork":false,"pushed_at":"2022-04-25T09:39:20.000Z","size":100,"stargazers_count":0,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T03:01:32.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/hiptest.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}},"created_at":"2017-08-28T09:02:01.000Z","updated_at":"2024-04-17T14:10:27.000Z","dependencies_parsed_at":"2022-07-16T04:46:07.079Z","dependency_job_id":null,"html_url":"https://github.com/hiptest/hps-java-junit-selenium","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiptest%2Fhps-java-junit-selenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiptest%2Fhps-java-junit-selenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiptest%2Fhps-java-junit-selenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiptest%2Fhps-java-junit-selenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiptest","download_url":"https://codeload.github.com/hiptest/hps-java-junit-selenium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249157598,"owners_count":21221984,"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":[],"created_at":"2024-10-11T03:15:57.519Z","updated_at":"2025-04-15T21:33:44.977Z","avatar_url":"https://github.com/hiptest.png","language":"Java","readme":"# hps-java-junit + Selenium\n\n [![Build Status](https://travis-ci.org/hiptest/hps-java-junit-selenium.svg?branch=master)](https://travis-ci.org/hiptest/hps-java-junit-selenium)\n\nHiptest publisher samples with Java/JUnit + Selenium\n\nIn this repository you'll find tests generated in Junit format from [Hiptest](https://hiptest.net), using [Hiptest publisher](https://github.com/hiptest/hiptest-publisher).\n\nThe goals are:\n\n * to show how tests are exported in JUnit.\n * to check exports work out of the box (well, with implemented actionwords in java)\n\nSystem under test\n------------------\n\nThe SUT is a (not that much) simple coffee machine. You start it, you ask for a coffee and you get it, sometimes. But most of times you have to add water or beans, empty the grounds. You have an automatic expresso machine at work or at home? So you know how it goes :-)\n\nUpdate tests\n-------------\n\nTo update the tests:\n\n    hiptest-publisher -c junit-selenium.conf --only=tests\n\nThe tests are generated in [``src/test/java/com/coffeemachine/``](https://github.com/hiptest/hps-java-junit-selenium/tree/master/src/test/java/com/coffeemachine)\n\nRun tests locally with Selenium\n-------------------------------\n\nFirst, you must use [``maven``](http://maven.apache.org/) to build the project and run the tests:\n\n    mvn package\n\nThe SUT implementation can be seen in [``src/web/coffee_machine.js``](https://github.com/hiptest/hps-java-junit-selenium/blob/master/java/src/web/coffee_machine.js)\n\nBy default test report is generated in ```target/surefire-reports/TEST-com.coffeemachine.*.xml```\n\nRun tests using Selenium + Cross browser testing\n------------------------------------------------\n\nYou will first need an account on [Cross browser testing](https://crossbrowsertesting.com). Once this is done, you will need to export a few variables to ensure you are using CrossBrowserTesting driver:\n\n```shell\nexport REMOTE_DRIVER_USERNAME=\u003cyour username on Cross Browser Testing\u003e\nexport REMOTE_DRIVER_PASSWORD=\u003cyour access key on Cross Browser Testing\u003e\nexport REMOTE_DRIVER_URL=hub.crossbrowsertesting.com:80/wd/hub\nexport USE_REMOTE_DRIVER=true\nexport USE_CBT=true\n```\n\n\nYou will also need to specify where the system under test is located, for example:\n\n```shell\nexport COFFEE_MACHINE_LOCATION=https://hiptest.github.io/hps-java-junit-selenium/src/web/coffee_machine.html\n```\n\nRun the tests as previously done:\n\n    mvn package\n\nThis should now use CrossBrowserTesting to run the tests\n\nRun tests using Selenium + SauceLabs\n------------------------------------\n\nYou will first need an account on [SauceLabs](https://saucelabs.com). Once this is done, you will need to export a few variables to ensure you are using SauceLabs driver:\n\n```shell\nexport REMOTE_DRIVER_USERNAME=\u003cyour username on SauceLabs\u003e\nexport REMOTE_DRIVER_PASSWORD=\u003cyour access key on SauceLabs\u003e\nexport REMOTE_DRIVER_URL=ondemand.saucelabs.com:443/wd/hub\nexport USE_REMOTE_DRIVER=true\nexport USE_SAUCELABS=true\n```\n\n\nYou will also need to specify where the system under test is located, for example:\n\n```shell\nexport COFFEE_MACHINE_LOCATION=https://hiptest.github.io/hps-java-junit-selenium/src/web/coffee_machine.html\n```\n\nRun the tests as previously done:\n\n    mvn package\n\nThis should now use SauceLabs to run the tests\n\nRunning tests on Travis-CI\n--------------------------\n\nThis repository is configured so tests are ran on Travis-CI. There are three environments: local Selenium web driver, SauceLabs and Cross Browser Testing.\n\nIf you do not want to run the tests on every plaform, edit the [``.travis.yml``](https://github.com/hiptest/hps-java-junit-selenium/blob/master/.travis.yml) file and remove the environment you do not want to get the tests ran against.\n\nFor SauceLabs and CBT, you can not use the ``REMOTE_DRIVER_USERNAME``and ``REMOTE_DRIVER_USERNAME`` variables. Instead, you should set the ``SAUCELABS_USERNAME``and ``SAUCELABS_PASSWORD`` or ``CBT_USENAME``and ``CBT_PASSWORD`` variables, depending on the platform you want to use to run your tests.\n\nOnce the build is started, you should see this kind of message in the logs:\n\n    Running test on SauceLABS, using account; vincent-psarga\n    Running test on CBT, using account; vincent%40hiptest.com\n\nIf your username does not appear, that means that the variables are not correctly set.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiptest%2Fhps-java-junit-selenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiptest%2Fhps-java-junit-selenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiptest%2Fhps-java-junit-selenium/lists"}