automated-tests

Perl and Selenium::Remote::Driver

China☆狼群 提交于 2021-01-27 21:30:21
问题 EDITED AGAIN I have a server on AWS somewhere in Northern Virginia and this is my monitoring server. I ssh into this Ubuntu server from another State to do system administration. I want to do web automation tests on this server which will test a web application on the Internet hitting a URL and verify that I can selenium test a login and authenticate successfully. This server is on an AWS cloud I'm not quite sure which Perl module to use since I'm accessing it remotely. There are two CPAN

Keep browser open while developing a test in Testcafe

南笙酒味 提交于 2021-01-27 20:00:39
问题 How to keep the browser window open after a test executes in Testcafe? There was a question on the forum here that brought me to a live Testcafe version, but it seems to be deprecated. I wish to keep the browser window open to see the elements while I'm developing the test. Update: This is my config file: { "name": "testcafe-demo", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "testcafe": "^1.8.2" }, "devDependencies": {}, "scripts": { "test": "testcafe chrome

How can I inject parameters into a TestCafé test?

徘徊边缘 提交于 2021-01-27 17:55:44
问题 Scenario: I run TestCafé wrapped in code, using the API I have a test I want to parameterize, testing with different dynamic values. Problem Testcafé has no support for sending parameters to a test. Is there a way to inject values? 回答1: You can use process.env to pass parameters to TestCafe tests from your runner script. //test.js const createTestCafe = require('testcafe'); (async => { process.env.foo = 'bar'; const testcafe = await createTestCafe(); await testcafe .createRunner() .src('test

How do I pass variable data between tests

浪子不回头ぞ 提交于 2021-01-27 13:21:31
问题 I am trying to do something similar to this post on TestCafe I am generating a random email in my helper.js file. I would like to use this random email to log in the test.js file. This is how I am creating my email in the helper.js var randomemail = 'test+' + Math.floor(Math.random() * 10000) + '@gmail.com' This is how I want to use it in my test.js file .typeText(page.emailInput, randomemail) I have tried several things without luck. How could I go about using the generated email in my test

Is it possible to use the TestCafe .meta object to skip tests running from the cli

ぃ、小莉子 提交于 2021-01-27 12:11:55
问题 I'm using TestCafe to run my integration tests. I know it has the test.skip function, which is great for when I'm testing locally and want to skip a set of tests I don't need/want to run... but I was wondering if there was a way to run ALL TESTS except --test-meta environmentSpecific=true etc? We have a number of different environments, and I'm looking for a simple way to skip tests via the CLI, depending on the environment we're targeting for the build. 回答1: Yes, you can do it using the

Run testcafe headless when passing custom args to Chrome binary via testcafe-browser-tools

强颜欢笑 提交于 2021-01-27 12:10:25
问题 Running testcafe inside a Vagrant VM, which is mostly working. However, Chrome doesn't start properly in this environment with hardware acceleration enabled, so I have to start it with the command line flag --disable-gpu . I'm leveraging the 'testcafe-browser-tools' package to accomplish this, by overriding the default browser command via the Runner class in the TestCafe API. This all works fine for the case of running TestCafe with it opening a browser window, but I've not been able to

How to pass a headless option for my driver using Java and Selenium?

守給你的承諾、 提交于 2021-01-27 08:02:58
问题 I am setting up a chrome driver with the help of Selenium and Java. I want this driver to be executed headless but I can't find out the way. Can you explain to me what do I need to do? My code sample: System.setProperty(CHROME_PROPERTY, LINUX_CHROMEDRIVER_PATH); driver = new ChromeDriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(DEFAULT_IMPLICITY_TIME, TimeUnit.SECONDS); 回答1: System.setProperty(CHROME_PROPERTY, LINUX_CHROMEDRIVER_PATH); // OS and

How to get the json response of a RequestLogger

China☆狼群 提交于 2021-01-27 06:10:50
问题 RequestLogger A have this test outside the main test controller, using page model and this recipe. /** Used to get the periodic analytic id. Whenever we are viewing an asset, the server must respond with an id. This id is later used by the client, to send periodic analytics. @param {object} t Testcafe's test controller @param {object} logger A testcafe's RequestLogger. @returns {string} Returns the periodic analytic id. */ async getPeriodicAnalyticId(t, logger) { const logPrefix = 'Get

How to get the json response of a RequestLogger

廉价感情. 提交于 2021-01-27 06:10:13
问题 RequestLogger A have this test outside the main test controller, using page model and this recipe. /** Used to get the periodic analytic id. Whenever we are viewing an asset, the server must respond with an id. This id is later used by the client, to send periodic analytics. @param {object} t Testcafe's test controller @param {object} logger A testcafe's RequestLogger. @returns {string} Returns the periodic analytic id. */ async getPeriodicAnalyticId(t, logger) { const logPrefix = 'Get

How do I Quickly Automate Sending FCM or APNS Messages?

南笙酒味 提交于 2021-01-27 04:44:47
问题 I am developing a backend service that sends push notifications to mobile apps via either FCM or APNS. I would like to create an automated test that can run in under a minute and validates that the server can successfully send a notification. Note that I do not necessarily need to check that the notification has been delivered, just that FCM or APNS has successfully processed the request to send the message. I know that theoretically I could automate this test using a tool like appium and use