qa

How to run XUnit test using data from a CSV file

余生颓废 提交于 2019-12-04 04:18:36
问题 Is there a way to run a data driven XUnit test using a CSV file as the data source? I've tried Cavity.Data.XUnit , but it's no longer compatible with the newest version of XUnit . So far, I've only been able to achieve this using Excel files, but I need to change them to CSV instead. Any help is greatly appreciated. An example: [Theory] [ExcelData(@"Settings\TestFileParam.xls", "Select url, username, password, from TestData")] //^Replace with a CSV file instead public void Tester_Method

Interacting with a PDF popup in Selenium

浪尽此生 提交于 2019-12-04 03:44:19
问题 I'm trying to test a page where clicking a button generates a popup that's in PDF form. I'd like selenium to click on the popup and either take a screenshot of the screen or save the pdf. I use the following code to get all the window handles to use the switchTo() command, but when i execute it it only returns a single window. Selenium doesn't seem to recognize the pdf popup. Set<String> handles = driver.getWindowHandles(); //converts set to array String[] array = handles.toArray(new String[0

How can I run Nightwatch tests in a specific order?

99封情书 提交于 2019-12-04 03:02:56
I have several tests which test the UI and also serve to create data along the way. A separate set of tests rely on this data, meaning that these must run only after the first set have run. I know about running a group of them, or running them with tags, but how can I run them in a specific order? Nightwatch will run each test within a particular file in order, so one (naive) solution would be to put every test in the same file, in the order you want them to run. This will get unwieldy if you have too many tests for a single file. To get around this, you can take advantage of Nightwatch

Selenium download file

这一生的挚爱 提交于 2019-12-03 20:44:53
I'm trying to make a selenium program to automatically download and upload some files. Note that I am not doing this for testing but for trying to automate some tasks. So here's my set_preference for the firefox profile profile.set_preference('browser.download.folderList', 2) # custom location profile.set_preference('browser.download.manager.showWhenStarting', False) profile.set_preference('browser.download.dir', '/home/jj/web') profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'application/json, text/plain, application/vnd.ms-excel, text/csv, text/comma-separated-values,

Testing objects with dependencies in PHPUnit

佐手、 提交于 2019-12-03 17:52:33
问题 For objects which compose another object as part of their implementation, what's the best way to write the unit test so only the principle object gets tested? Trivial example: class myObj { public function doSomethingWhichIsLogged() { // ... $logger = new logger('/tmp/log.txt'); $logger->info('some message'); // ... } } I know that the object could be designed so that the logger object dependency could be injected and hence mocked in a unit test, but that's not always the case - in more

Selenium Web driver wait for long time

落花浮王杯 提交于 2019-12-03 16:27:17
Can I wait with Selenium Web Driver for a long time period? Even though I can set implicitlywait command like below, it doesn't wait the time that I've given. driver.manage().timeouts().implicitlyWait(5, TimeUnit.MINUTES); Is there anything wrong here? In my case, I need to execute one test case and wait for 4 minutes and then execute the next test case. I use Java here. Considering you need to wait for a particular element i'd do something in the lines of a ExplicitWait like below. WebDriverWait wait = new WebDriverWait(driver, 300); // The int here is the maximum time in seconds the element

Asked to fix bugs in a program, you find over 100 instances of

自闭症网瘾萝莉.ら 提交于 2019-12-03 14:42:40
问题 catch(Exception ex) { } What's the best way to proceed? Rip them all out and let it crash? Add logging code? Message boxes? This is in C#. 回答1: It partly depends on how aggressive you can be. Is this app internal or external? Will your changes be deployed on live systems soon? Do you have specific bugs to fix, or is it just deemed to be a disaster? To reduce the bug count as quickly as possible, but with the most risk of serious damage, just remove all the catch blocks and let exceptions

Is quality assurance the same as testing and bug fixing? [closed]

我只是一个虾纸丫 提交于 2019-12-03 14:39:57
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . What is quality assurance? Is it testing and bug fixing, or is it something more? Software QA involves the entire software development process - monitoring and improving the process, making sure that any agreed-upon standards and procedures are followed, and ensuring that problems are found and dealt with. more detail: Software QA FAQ Q) What is Quality Assurance? Quality assurance refers

Good QA / Testing Podcast [closed]

你。 提交于 2019-12-03 13:36:48
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . Can anyone recommend a good Podcast for Quality Assurance / Tester folks. I find there is a wide variety on development but yet to

Unit Testing for VBScript, ASP Code and SQL Server 2000

亡梦爱人 提交于 2019-12-03 13:23:11
I have a very old project implemented in (classic) ASP and SQL Server 2000. Because of quality concerns, I've been considering the possibility of implementing some form of automated quality testing. Though, the web pages are ASP the project is really 85% SQL Server stored procedure, functions, views and DTS. (Lots of dependency on DTS) A lot of code generation occurs from SQL Server. In regards to the DTS, we are hoping to possibly upgrade the database to SQL Server 2005 -- so If unit testing can't be setup on DTS, what about SSIS? I've found ASPUnit but it no longer seems to be maintained...