black-box-testing

How to handle modal dialog in pytest-qt without mocking the dialog

空扰寡人 提交于 2021-01-29 07:30:47
问题 I am using pytest-qt to automate the testing of a PyQt GUI. The dialogs need to be handled as a part of the testing(dialogs should not be mocked). For example, file dialog that comes after a button-click has to be handled. There are 2 problems After the button click command, the program control goes to the event handler and not to the next line where I can try to send mouseclick/keystrokes to the dialog. Since the QDialog is not added to the main widget, it is not being listed among the

django test coverage with black box testing?

。_饼干妹妹 提交于 2021-01-27 13:00:25
问题 We are testing a Django applications with a black box (functional integration) testing approach, where a client performs tests with REST API calls to the Django application. The client is running on a different VM, so we can not use the typical coverage.py (I think). Is there a way to compute the coverage of these black box tests? Can I somehow instruct Django to start and stop in test coverage mode and then report test coverage? 回答1: The coverage for functional integration tests are really a

Best practice for looped JUnit test

你说的曾经没有我的故事 提交于 2019-12-22 01:27:46
问题 In a school assignment, I should write blackbox test for a method that returns true for a parameter < 80 and false otherwise. Currently my approach would be for (int i = 0; i < 80; i++) { assertTrue(someMethod(i)); } for (int i = 80; i <= 100; i++) { assertFalse(someMethod(i)); } However, this would require 100 seperate assertions. Is there a best/better practice method? If relevant, I'm using JUnit 5 but could switch to JUnit 4 if required (it's just a school assignment after all). Regards.

Should I unit test concurrency?

自古美人都是妖i 提交于 2019-12-11 01:54:34
问题 I have a few methods that are impacted by concurrency. Specifically "Rush" (a.k.a Race) conditions. Should I unit test them or integrate/black-box test them? I think that setting up a unit test might be a rather difficult task, but also is integration test... 回答1: Unit tests must be deterministic, so concurrency doesn't belong there. (I keep my unit tests completely synchronous.) Go for integration tests to sniff out race conditions — but be prepared for false positives. In other words, the

Are there efficient methods of black box testing that can avoid redundancy?

冷暖自知 提交于 2019-12-08 08:26:32
问题 I've been conducting black box testing for a software program that does engineering analysis on different types of concentrated solar power (CSP) models. The quality assurance testing I've been conducting has involved only changing one default parameters of the model at a time. It's been very simple where I've just been verifying whether or not the output matches the expected result. However, now I want to start exploring combinations of configurations that differ from the default set up to

Best practice for looped JUnit test

耗尽温柔 提交于 2019-12-04 21:41:20
In a school assignment, I should write blackbox test for a method that returns true for a parameter < 80 and false otherwise. Currently my approach would be for (int i = 0; i < 80; i++) { assertTrue(someMethod(i)); } for (int i = 80; i <= 100; i++) { assertFalse(someMethod(i)); } However, this would require 100 seperate assertions. Is there a best/better practice method? If relevant, I'm using JUnit 5 but could switch to JUnit 4 if required (it's just a school assignment after all). Regards. For JUnit 5 consider the repeated test feature: https://junit.org/junit5/docs/current/user-guide/

Unit testing, Black-box testing and white box testing [closed]

≯℡__Kan透↙ 提交于 2019-12-03 15:44:18
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 10 months ago . What is Unit testing, Black-box testing and White-Box testing? I googled but all the explanation I found was very technical. Can anyone answer this question in a simple way with an appropriate example? 回答1: In black box testing , you don't care how the internals of the thing