testing

Does Unit Tests still matter if Functional Tests is satisfied?

偶尔善良 提交于 2019-12-25 16:44:04
问题 For a short summary: Unit tests are the smaller ones that expects something to do it right in dev's view. Functional tests are those that expects things are right in user's view If Functional Tests are already satisfied, do we still need to do Unit Tests? Most likely (let's use web development as context), this is common by using the browser to see if things are right by letting other users/people try the system/application. Let us put out other tests like for edge cases. 回答1: Are there any

Unit testing: How can i import test classes dynamically and run?

空扰寡人 提交于 2019-12-25 16:37:02
问题 I'm doing a simple script to run and test my code. How can i import dinamically and run my test classes? 回答1: This is the solution that I found to import and dynamically run my test classes. import glob import os import imp import unittest def execute_all_tests(tests_folder): test_file_strings = glob.glob(os.path.join(tests_folder, 'test_*.py')) suites = [] for test in test_file_strings: mod_name, file_ext = os.path.splitext(os.path.split(test)[-1]) py_mod = imp.load_source(mod_name, test)

Running parallel jobs in Jenkins

限于喜欢 提交于 2019-12-25 15:51:14
问题 I'm using Jenkins for my builds, and I wrote some test scripts that I need to run after the compilation of the build. I want to save some time, so I have to run the test scripts parallel. How can I do that? EDIT: ok, I understand know that I need a separate Job for each test (for 4 tests I need 4 jobs, right?) So, I did that, and via the parent job I ran this jobs. (using "build other projects" plugin). But I didn't managed to aggregate the results (using aggregate downstream test results).

Optimized Way for Data Parameterization in TestNG

ⅰ亾dé卋堺 提交于 2019-12-25 15:32:24
问题 I am trying to create a framework using selenium and TestNG. As a part of the framework i am trying to implement Data Parameterization. But i am confused about optimized way of implementing Data parameterization. Here is the following approaches i made. With Data Providers (from excel i am reading and storing in object[][]) With testng.xml Issues with Data Providers: Lets say if my Test needs to handle large volumes of data , say 15 different data, then i need to pass 15 parameters to it.

Optimized Way for Data Parameterization in TestNG

 ̄綄美尐妖づ 提交于 2019-12-25 15:31:10
问题 I am trying to create a framework using selenium and TestNG. As a part of the framework i am trying to implement Data Parameterization. But i am confused about optimized way of implementing Data parameterization. Here is the following approaches i made. With Data Providers (from excel i am reading and storing in object[][]) With testng.xml Issues with Data Providers: Lets say if my Test needs to handle large volumes of data , say 15 different data, then i need to pass 15 parameters to it.

Optimized Way for Data Parameterization in TestNG

十年热恋 提交于 2019-12-25 15:30:18
问题 I am trying to create a framework using selenium and TestNG. As a part of the framework i am trying to implement Data Parameterization. But i am confused about optimized way of implementing Data parameterization. Here is the following approaches i made. With Data Providers (from excel i am reading and storing in object[][]) With testng.xml Issues with Data Providers: Lets say if my Test needs to handle large volumes of data , say 15 different data, then i need to pass 15 parameters to it.

Stub Controller in Play 2.0

♀尐吖头ヾ 提交于 2019-12-25 14:23:53
问题 I am trying folow the example from Mock Objects in Play[2.0] but unfortunately I am not having success. I have a UsersController that uses a UserModel. trait UserModel extends ModelCompanion[User, ObjectId] { // ... } Next, the abstract controller abstract class UsersController extends Controller { val userModel: UserModel def sayHello = Action(parse.json) { request => // return a play Action. Doesn't use userModel } // Other methods } In the routes file, I call method say Hello in this way:

test serializations REST JAXRS

[亡魂溺海] 提交于 2019-12-25 14:09:15
问题 I'm built REST services using JAXRS. I'd like to test how JAXRS implementation serializes the body content of each request, and be able to provide some test examples in order to check the body content is serialized correctly. For example: public void createOrUpdate(FollowUpActivityDTO dto) throws RepositorySystemException { } I'm using jackson provider in order to do that: compile group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-json-provider', version: '2.5.3' I'd like to provide

test serializations REST JAXRS

余生长醉 提交于 2019-12-25 14:08:26
问题 I'm built REST services using JAXRS. I'd like to test how JAXRS implementation serializes the body content of each request, and be able to provide some test examples in order to check the body content is serialized correctly. For example: public void createOrUpdate(FollowUpActivityDTO dto) throws RepositorySystemException { } I'm using jackson provider in order to do that: compile group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-json-provider', version: '2.5.3' I'd like to provide

Webservice test isolation - but when to verify the webservice itself?

妖精的绣舞 提交于 2019-12-25 13:08:12
问题 I am isolating my webservice-related tests from the actual webservices with Stubs. How do you/should i incorporate tests to ensure that my crafted responses match the actual webservice ones (i don't have control over it)? I don't want to know how to do it, but when and where? Should i create a testsuite-testsuite for testdata testing?... 回答1: I would use something like this excellent tool Storm 回答2: If you can, install the service in a small, completely controlled environment. Drawback: You