Search Results

Search found 26978 results on 1080 pages for 'load testing'.

Page 1/1080 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Automated unit testing, integration testing or acceptance testing

    - by bjarkef
    TDD and unit testing seems to be the big rave at the moment. But it is really that useful compared to other forms of automated testing? Intuitively I would guess that automated integration testing is way more useful than unit testing. In my experience the most bugs seems to be in the interaction between modules, and not so much the actual (usual limited) logic of each unit. Also regressions often happened because of changing interfaces between modules (and changed pre and post-conditions.) Am I misunderstanding something, or why are unit testing getting so much focus compared to integration testing? It is simply because it is assumed that integration testing is something you have, and unit testing is the next thing we need to learn to apply as developers? Or maybe unit testing simply yields the highest gain compared to the complexity of automating it? What are you experience with automated unit testing, automated integration testing, and automated acceptance testing, and in your experience what has yielded the highest ROI? and why? If you had to pick just one form of testing to be automated on your next project, which would it be? Thanks in advance.

    Read the article

  • Unit testing best practices for a unit testing newbie

    - by wilhil
    In recent years, I have only written small components for people in larger projects or small tools. I have never written a unit test and it always seems like learning how to write them and actually making one takes a lot longer than simply firing up the program and testing for real. I am just about to start a fairly large scale project that could take a few months to complete and whilst I will try to test elements as I write them (like always), I am wondering if unit testing could save me time. I was just wondering if anyone could give good advice: Should I be looking at unit testing at the start of the project and possibly adopt a TDD approach. Should I just write tests as I go along, after each section is complete. Should I complete the project and then write unit tests at the end.

    Read the article

  • Should programmers itemize testing in testing? [on hold]

    - by Patton77
    I recently hired a programming team to do a port of my iPad app to the iPhone and Android platforms. Now, in a separate contract, I am asking them to implement a bunch of tips on how to play the app, similar like you would find in Candy Crush or Cut the Rope. They want to charge 12 hours @ $35/hr for the "Testing all of the Tips", telling me that normally it would take them more than 25 hours but that they will 'bear the difference'. I am not familiar with this level of itemization, but maybe it's a new practice? I am used to devs doing their own quality control, and then having a testing/acceptance period. They are using Cocos 2D-X, and they say that the tips going to multiple platforms makes all of the hours jack up. I feel like they might be overcharging, and it's difficult for me to know because it's kind of like with a mechanic. "It took us 5 hours to replace the radiator". How can you dispute that? It seems to me that most of you would charge for the work but NOT for hours that you are 'testing'. Am I missing something? Thanks for any help and advice you can give!

    Read the article

  • Manual testing Vs Automated testing

    - by mgj
    Respected all, As many know testing can be mainly classified into manual and automated testing. With regard to this certain questions come to mind. Hope you can help... They include: What is the basic difference between the two types of testing? What are the elements of challenges involved in both manual and automated testing? What are the different skill sets required by a software tester for manual and automated testing respectively? What are the different job prospects and growth opportunities among software testers who do manual testing automated testing respectively? Is manual testing under rated to automated testing in anyway(s)? If yes, kindly specify the way. How differently are the manual testers treated in comparison to automated testers in the corporate world?( If they truly are differentiated in any terms as such ) I hope you can share your knowledge in answering these questions.. Thank you for your time..:)

    Read the article

  • Unable to start sublime text

    - by Pramod
    I had been using Sublime Text 2 with no issues. I installed IDLE and now I'm unable to start Sublime Text. I tried uninstalling IDLE, but Sublime Text is still not starting. Here's the error: Unable to load libgdk-x11-2.0.so Unable to load gdk_cairo_create from libgdk-x11-2.0.so Unable to load gdk_cursor_new_for_display from libgdk-x11-2.0.so Unable to load gdk_cursor_unref from libgdk-x11-2.0.so Unable to load gdk_error_trap_pop from libgdk-x11-2.0.so Unable to load gdk_error_trap_push from libgdk-x11-2.0.so Unable to load gdk_input_add from libgdk-x11-2.0.so Unable to load gdk_input_remove from libgdk-x11-2.0.so Unable to load gdk_keymap_translate_keyboard_state from libgdk-x11-2.0.so Unable to load gdk_keyval_to_unicode from libgdk-x11-2.0.so Unable to load gdk_pixbuf_new_from_file from libgdk-x11-2.0.so Unable to load gdk_region_get_rectangles from libgdk-x11-2.0.so Unable to load gdk_screen_get_default from libgdk-x11-2.0.so Unable to load gdk_screen_get_display from libgdk-x11-2.0.so Unable to load gdk_screen_get_height from libgdk-x11-2.0.so Unable to load gdk_screen_get_rgb_colormap from libgdk-x11-2.0.so Unable to load gdk_screen_get_rgba_colormap from libgdk-x11-2.0.so Unable to load gdk_screen_get_root_window from libgdk-x11-2.0.so Unable to load gdk_screen_get_width from libgdk-x11-2.0.so Unable to load gdk_screen_get_n_monitors from libgdk-x11-2.0.so Unable to load gdk_screen_get_monitor_geometry from libgdk-x11-2.0.so Unable to load gdk_unicode_to_keyval from libgdk-x11-2.0.so Unable to load gdk_window_get_frame_extents from libgdk-x11-2.0.so Unable to load gdk_window_get_origin from libgdk-x11-2.0.so Unable to load gdk_window_get_state from libgdk-x11-2.0.so Unable to load gdk_window_invalidate_rect from libgdk-x11-2.0.so Unable to load gdk_window_set_cursor from libgdk-x11-2.0.so Unable to load gdk_window_move_resize from libgdk-x11-2.0.so Unable to load gdk_x11_display_get_xdisplay from libgdk-x11-2.0.so Unable to load gdk_x11_drawable_get_xid from libgdk-x11-2.0.so Unable to load gdk_x11_get_server_time from libgdk-x11-2.0.so Unable to load gdk_x11_get_xatom_by_name_for_display from libgdk-x11-2.0.so Unable to load gdk_x11_window_set_user_time from libgdk-x11-2.0.so Unable to load libgtk-x11-2.0.so Unable to load gtk_accel_group_new from libgtk-x11-2.0.so Unable to load gtk_accelerator_get_default_mod_mask from libgtk-x11-2.0.so Unable to load gtk_box_get_type from libgtk-x11-2.0.so Unable to load gtk_box_pack_start from libgtk-x11-2.0.so Unable to load gtk_check_menu_item_get_type from libgtk-x11-2.0.so Unable to load gtk_check_menu_item_new_with_label from libgtk-x11-2.0.so Unable to load gtk_check_menu_item_set_active from libgtk-x11-2.0.so Unable to load gtk_clipboard_clear from libgtk-x11-2.0.so Unable to load gtk_clipboard_get from libgtk-x11-2.0.so Unable to load gtk_clipboard_set_text from libgtk-x11-2.0.so Unable to load gtk_clipboard_set_with_data from libgtk-x11-2.0.so Unable to load gtk_clipboard_store from libgtk-x11-2.0.so Unable to load gtk_clipboard_wait_for_text from libgtk-x11-2.0.so Unable to load gtk_container_add from libgtk-x11-2.0.so Unable to load gtk_container_get_children from libgtk-x11-2.0.so Unable to load gtk_container_get_type from libgtk-x11-2.0.so Unable to load gtk_container_remove from libgtk-x11-2.0.so Unable to load gtk_dialog_add_button from libgtk-x11-2.0.so Unable to load gtk_dialog_get_type from libgtk-x11-2.0.so Unable to load gtk_dialog_run from libgtk-x11-2.0.so Unable to load gtk_dialog_set_default_response from libgtk-x11-2.0.so Unable to load gtk_drag_dest_set from libgtk-x11-2.0.so Unable to load gtk_drag_finish from libgtk-x11-2.0.so Unable to load gtk_file_chooser_add_filter from libgtk-x11-2.0.so Unable to load gtk_file_chooser_dialog_new from libgtk-x11-2.0.so Unable to load gtk_file_chooser_get_filename from libgtk-x11-2.0.so Unable to load gtk_file_chooser_get_files from libgtk-x11-2.0.so Unable to load gtk_file_chooser_get_type from libgtk-x11-2.0.so Unable to load gtk_file_chooser_set_current_folder from libgtk-x11-2.0.so Unable to load gtk_file_chooser_set_current_name from libgtk-x11-2.0.so Unable to load gtk_file_chooser_set_do_overwrite_confirmation from libgtk-x11-2.0.so Unable to load gtk_file_chooser_set_local_only from libgtk-x11-2.0.so Unable to load gtk_file_chooser_set_select_multiple from libgtk-x11-2.0.so Unable to load gtk_file_filter_add_pattern from libgtk-x11-2.0.so Unable to load gtk_file_filter_new from libgtk-x11-2.0.so Unable to load gtk_file_filter_set_name from libgtk-x11-2.0.so Unable to load gtk_get_current_event_time from libgtk-x11-2.0.so Unable to load gtk_im_context_filter_keypress from libgtk-x11-2.0.so Unable to load gtk_im_context_set_client_window from libgtk-x11-2.0.so Unable to load gtk_im_multicontext_new from libgtk-x11-2.0.so Unable to load gtk_init from libgtk-x11-2.0.so Unable to load gtk_main from libgtk-x11-2.0.so Unable to load gtk_main_quit from libgtk-x11-2.0.so Unable to load gtk_menu_attach_to_widget from libgtk-x11-2.0.so Unable to load gtk_menu_bar_new from libgtk-x11-2.0.so Unable to load gtk_menu_get_type from libgtk-x11-2.0.so Unable to load gtk_menu_item_get_label from libgtk-x11-2.0.so Unable to load gtk_menu_item_get_submenu from libgtk-x11-2.0.so Unable to load gtk_menu_item_get_type from libgtk-x11-2.0.so Unable to load gtk_menu_item_new_with_label from libgtk-x11-2.0.so Unable to load gtk_menu_item_set_label from libgtk-x11-2.0.so Unable to load gtk_menu_item_set_submenu from libgtk-x11-2.0.so Unable to load gtk_menu_item_set_use_underline from libgtk-x11-2.0.so Unable to load gtk_menu_new from libgtk-x11-2.0.so Unable to load gtk_menu_popup from libgtk-x11-2.0.so Unable to load gtk_menu_shell_append from libgtk-x11-2.0.so Unable to load gtk_menu_shell_get_type from libgtk-x11-2.0.so Unable to load gtk_message_dialog_new from libgtk-x11-2.0.so Unable to load gtk_message_dialog_new_with_markup from libgtk-x11-2.0.so Unable to load gtk_selection_data_get_uris from libgtk-x11-2.0.so Unable to load gtk_selection_data_set_text from libgtk-x11-2.0.so Unable to load gtk_separator_menu_item_new from libgtk-x11-2.0.so Unable to load gtk_settings_get_default from libgtk-x11-2.0.so Unable to load gtk_show_uri from libgtk-x11-2.0.so Unable to load gtk_vbox_new from libgtk-x11-2.0.so Unable to load gtk_widget_add_accelerator from libgtk-x11-2.0.so Unable to load gtk_widget_add_events from libgtk-x11-2.0.so Unable to load gtk_widget_destroy from libgtk-x11-2.0.so Unable to load gtk_widget_get_display from libgtk-x11-2.0.so Unable to load gtk_widget_get_parent from libgtk-x11-2.0.so Unable to load gtk_widget_get_screen from libgtk-x11-2.0.so Unable to load gtk_widget_get_type from libgtk-x11-2.0.so Unable to load gtk_widget_get_window from libgtk-x11-2.0.so Unable to load gtk_widget_grab_focus from libgtk-x11-2.0.so Unable to load gtk_widget_hide from libgtk-x11-2.0.so Unable to load gtk_widget_remove_accelerator from libgtk-x11-2.0.so Unable to load gtk_widget_set_app_paintable from libgtk-x11-2.0.so Unable to load gtk_widget_set_colormap from libgtk-x11-2.0.so Unable to load gtk_widget_set_double_buffered from libgtk-x11-2.0.so Unable to load gtk_widget_set_sensitive from libgtk-x11-2.0.so Unable to load gtk_widget_show from libgtk-x11-2.0.so Unable to load gtk_widget_show_all from libgtk-x11-2.0.so Unable to load gtk_window_add_accel_group from libgtk-x11-2.0.so Unable to load gtk_window_fullscreen from libgtk-x11-2.0.so Unable to load gtk_window_get_type from libgtk-x11-2.0.so Unable to load gtk_window_iconify from libgtk-x11-2.0.so Unable to load gtk_window_maximize from libgtk-x11-2.0.so Unable to load gtk_window_move from libgtk-x11-2.0.so Unable to load gtk_window_new from libgtk-x11-2.0.so Unable to load gtk_window_present_with_time from libgtk-x11-2.0.so Unable to load gtk_window_remove_accel_group from libgtk-x11-2.0.so Unable to load gtk_window_resize from libgtk-x11-2.0.so Unable to load gtk_window_set_default_icon_list from libgtk-x11-2.0.so Unable to load gtk_window_set_default_size from libgtk-x11-2.0.so Unable to load gtk_window_set_keep_above from libgtk-x11-2.0.so Unable to load gtk_window_set_modal from libgtk-x11-2.0.so Unable to load gtk_window_set_position from libgtk-x11-2.0.so Unable to load gtk_window_set_title from libgtk-x11-2.0.so Unable to load gtk_window_set_transient_for from libgtk-x11-2.0.so Unable to load gtk_window_set_type_hint from libgtk-x11-2.0.so Unable to load gtk_window_stick from libgtk-x11-2.0.so Unable to load gtk_window_unfullscreen from libgtk-x11-2.0.so Unable to load cairo_clip from libcairo.so Unable to load cairo_create from libcairo.so Unable to load cairo_destroy from libcairo.so Unable to load cairo_fill from libcairo.so Unable to load cairo_font_options_create from libcairo.so Unable to load cairo_font_options_destroy from libcairo.so Unable to load cairo_font_options_set_antialias from libcairo.so Unable to load cairo_get_source from libcairo.so Unable to load cairo_image_surface_create from libcairo.so Unable to load cairo_image_surface_create_for_data from libcairo.so Unable to load cairo_image_surface_get_data from libcairo.so Unable to load cairo_image_surface_get_format from libcairo.so Unable to load cairo_image_surface_get_height from libcairo.so Unable to load cairo_image_surface_get_stride from libcairo.so Unable to load cairo_image_surface_get_width from libcairo.so Unable to load cairo_line_to from libcairo.so Unable to load cairo_matrix_init_scale from libcairo.so Unable to load cairo_matrix_init_translate from libcairo.so Unable to load cairo_matrix_translate from libcairo.so Unable to load cairo_move_to from libcairo.so Unable to load cairo_paint_with_alpha from libcairo.so Unable to load cairo_pattern_set_extend from libcairo.so Unable to load cairo_pattern_set_matrix from libcairo.so Unable to load cairo_rectangle from libcairo.so Unable to load cairo_reset_clip from libcairo.so Unable to load cairo_restore from libcairo.so Unable to load cairo_save from libcairo.so Unable to load cairo_set_line_width from libcairo.so Unable to load cairo_set_operator from libcairo.so Unable to load cairo_set_source_rgb from libcairo.so Unable to load cairo_set_source_rgba from libcairo.so Unable to load cairo_set_source_surface from libcairo.so Unable to load cairo_stroke from libcairo.so Unable to load cairo_surface_destroy from libcairo.so Unable to load cairo_surface_flush from libcairo.so Unable to load cairo_translate from libcairo.so Unable to load cairo_scale from libcairo.so Unable to load pango_font_description_free from libpango-1.0.so Unable to load pango_font_description_new from libpango-1.0.so Unable to load pango_font_description_set_family from libpango-1.0.so Unable to load pango_font_description_set_size from libpango-1.0.so Unable to load pango_font_description_set_style from libpango-1.0.so Unable to load pango_font_description_set_weight from libpango-1.0.so Unable to load pango_font_get_metrics from libpango-1.0.so Unable to load pango_font_map_load_font from libpango-1.0.so Unable to load pango_font_metrics_get_ascent from libpango-1.0.so Unable to load pango_font_metrics_get_descent from libpango-1.0.so Unable to load pango_font_metrics_unref from libpango-1.0.so Unable to load pango_language_get_default from libpango-1.0.so Unable to load pango_layout_get_context from libpango-1.0.so Unable to load pango_layout_get_pixel_extents from libpango-1.0.so Unable to load pango_layout_set_font_description from libpango-1.0.so Unable to load pango_layout_set_text from libpango-1.0.so Unable to load pango_cairo_context_set_font_options from libpangocairo-1.0.so Unable to load pango_cairo_create_layout from libpangocairo-1.0.so Unable to load pango_font_map_create_context from libpangocairo-1.0.so Unable to load pango_cairo_font_map_get_default from libpangocairo-1.0.so Unable to load pango_cairo_show_layout from libpangocairo-1.0.so Unable to load pango_cairo_update_layout from libpangocairo-1.0.so Unable to load all required GTK functions Unable to init px Any solutions? Thanks!

    Read the article

  • In rails, what defines unit testing as opposed to other kinds of testing

    - by junky
    Initially I thought this was simple: unit testing for models with other testing such as integration for controller and browser testing for views. But more recently I've seen a lot of references to unit testing that doesn't seem to exactly follow this format. Is it possible to have a unit test of a controller? Does that mean that just one method is called? What's the distinction? What does unit testing really means in my rails world?

    Read the article

  • Is unit testing development or testing?

    - by Rubio
    I had a discussion with a testing manager about the role of unit and integration testing. She requested that developers report what they have unit and integration tested and how. My perspective is that unit and integration testing are part of the development process, not the testing process. Beyond semantics what I mean is that unit and integration tests should not be included in the testing reports and systems testers should not be concerned about them. My reasoning is based on two things. Unit and integration tests are planned and performed against an interface and a contract, always. Regardless of whether you use formalized contracts you still test what e.g. a method is supposed to do, i.e. a contract. In integration testing you test the interface between two distinct modules. The interface and the contract determine when the test passes. But you always test a limited part of the whole system. Systems testing on the other hand is planned and performed against the system specifications. The spec determines when the test passes. I don't see any value in communicating the breadth and depth of unit and integration tests to the (systems) tester. Suppose I write a report that lists what kind of unit tests are performed on a particular business layer class. What is he/she supposed to take away from that? Judging what should and shouldn't be tested from that is a false conclusion because the system may still not function the way the specs require even though all unit and integration tests pass. This might seem like useless academic discussion but if you work in a strictly formal environment as I do, it's actually important in determining how we do things. Anyway, am I totally wrong? (Sorry for the long post.)

    Read the article

  • Differences between software testing processes and techniques?

    - by Aptos
    I get confused between these terms. For examples, should Unit testing be listed as a software testing process or technique? I think unit testing is a software testing technique. And how about Test driven development? Can you give me some examples for software testing processes and techniques? In my opinion, software testing process is a part of the software development life cycle. For example, if we use V-Model, the software testing process will be System test, Acceptance test, Integration Test... Thank you.

    Read the article

  • Is it dangerous to substitute unit tests for user testing? [closed]

    - by MushinNoShin
    Is it dangerous to substitute unit tests for user testing? A co-worker believes we can reduce the manual user testing we need to do by adding more unit tests. Is this dangerous? Unit tests seem to have a very different purpose than user testing. Aren't unit tests to inform design and allow breaking changes to be caught early? Isn't that fundamentally different than determining if an aspect of the system is correct as a whole of the system? Is this a case of substituting apples for oranges?

    Read the article

  • Unit and Integration testing: How can it become a reflex

    - by LordOfThePigs
    All the programmers in my team are familiar with unit testing and integration testing. We have all worked with it. We have all written tests with it. Some of us even have felt an improved sense of trust in his/her own code. However, for some reason, writing unit/integration tests has not become a reflex for any of the members of the team. None of us actually feel bad when not writing unit tests at the same time as the actual code. As a result, our codebase is mostly uncovered by unit tests, and projects enter production untested. The problem with that, of course is that once your projects are in production and are already working well, it is virtually impossible to obtain time and/or budget to add unit/integration testing. The members of my team and myself are already familiar with the value of unit testing (1, 2) but it doesn't seem to help bringing unit testing into our natural workflow. In my experience making unit tests and/or a target coverage mandatory just results in poor quality tests and slows down team members simply because there is no self-generated motivation to produce these tests. Also as soon as pressure eases, unit tests are not written any more. My question is the following: Is there any methods that you have experimented with that helps build a dynamic/momentum inside the team, leading to people naturally wanting to create and maintain those tests?

    Read the article

  • How and when to use UNIT testing properly

    - by Zebs
    I am an iOS developer. I have read about unit testing and how it is used to test specific pieces of your code. A very quick example has to do with processing JSON data onto a database. The unit test reads a file from the project bundle and executes the method that is in charge of processing JSON data. But I dont get how this is different from actually running the app and testing with the server. So my question might be a bit general, but I honestly dont understand the proper use of unit testing, or even how it is useful; I hope the experienced programmers that surf around StackOverflow can help me. Any help is very much appreciated!

    Read the article

  • What are the disadvantages of automated testing?

    - by jkohlhepp
    There are a number of questions on this site that give plenty of information about the benefits that can be gained from automated testing. But I didn't see anything that represented the other side of the coin: what are the disadvantages? Everything in life is a tradeoff and there are no silver bullets, so surely there must be some valid reasons not to do automated testing. What are they? Here's a few that I've come up with: Requires more initial developer time for a given feature Requires a higher skill level of team members Increase tooling needs (test runners, frameworks, etc.) Complex analysis required when a failed test in encountered - is this test obsolete due to my change or is it telling me I made a mistake? Edit I should say that I am a huge proponent of automated testing, and I'm not looking to be convinced to do it. I'm looking to understand what the disadvantages are so when I go to my company to make a case for it I don't look like I'm throwing around the next imaginary silver bullet. Also, I'm explicity not looking for someone to dispute my examples above. I am taking as true that there must be some disadvantages (everything has trade-offs) and I want to understand what those are.

    Read the article

  • Should programmers itemize testing for projects? [on hold]

    - by Patton77
    I recently hired a programming team to do a port of my iPad app to the iPhone and Android platforms. Now, in a separate contract, I am asking them to implement a bunch of tips on how to play the app, similar like you would find in Candy Crush or Cut the Rope. They want to charge 12 hours @ $35/hr for the "Testing all of the Tips", telling me that normally it would take them more than 25 hours but that they will 'bear the difference'. I am not familiar with this level of itemization, but maybe it's a new practice? I am used to devs doing their own quality control, and then having a testing/acceptance period. They are using Cocos 2D-X, and they say that the tips going to multiple platforms makes all of the hours jack up. I feel like they might be overcharging, and it's difficult for me to know because it's kind of like with a mechanic. "It took us 5 hours to replace the radiator". How can you dispute that? It seems to me that most of you would charge for the work but NOT for hours that you are 'testing'. Am I missing something? Thanks for any help and advice you can give!

    Read the article

  • design pattern for unit testing? [duplicate]

    - by Maddy.Shik
    This question already has an answer here: Unit testing best practices for a unit testing newbie 4 answers I am beginner in developing test cases, and want to follow good patterns for developing test cases rather than following some person or company's specific ideas. Some people don't make test cases and just develop the way their senior have done in their projects. I am facing lot problems like object dependencies (when want to test method which persist A object i have to first persist B object since A is child of B). Please suggest some good books or sites preferably for learning design pattern for unit test cases. Or reference to some good source code or some discussion for Dos and Donts will do wonder. So that i can avoid doing mistakes be learning from experience of others.

    Read the article

  • Unit testing in Django

    - by acjohnson55
    I'm really struggling to write effective unit tests for a large Django project. I have reasonably good test coverage, but I've come to realize that the tests I've been writing are definitely integration/acceptance tests, not unit tests at all, and I have critical portions of my application that are not being tested effectively. I want to fix this ASAP. Here's my problem. My schema is deeply relational, and heavily time-oriented, giving my model object high internal coupling and lots of state. Many of my model methods query based on time intervals, and I've got a lot of auto_now_add going on in timestamped fields. So take a method that looks like this for example: def summary(self, startTime=None, endTime=None): # ... logic to assign a proper start and end time # if none was provided, probably using datetime.now() objects = self.related_model_set.manager_method.filter(...) return sum(object.key_method(startTime, endTime) for object in objects) How does one approach testing something like this? Here's where I am so far. It occurs to me that the unit testing objective should be given some mocked behavior by key_method on its arguments, is summary correctly filtering/aggregating to produce a correct result? Mocking datetime.now() is straightforward enough, but how can I mock out the rest of the behavior? I could use fixtures, but I've heard pros and cons of using fixtures for building my data (poor maintainability being a con that hits home for me). I could also setup my data through the ORM, but that can be limiting, because then I have to create related objects as well. And the ORM doesn't let you mess with auto_now_add fields manually. Mocking the ORM is another option, but not only is it tricky to mock deeply nested ORM methods, but the logic in the ORM code gets mocked out of the test, and mocking seems to make the test really dependent on the internals and dependencies of the function-under-test. The toughest nuts to crack seem to be the functions like this, that sit on a few layers of models and lower-level functions and are very dependent on the time, even though these functions may not be super complicated. My overall problem is that no matter how I seem to slice it, my tests are looking way more complex than the functions they are testing.

    Read the article

  • Using a service registry that doesn’t suck Part III: Service testing is part of SOA governance

    - by gsusx
    This is the third post of this series intended to highlight some of the principles of modern SOA governance solution. You can read the first two parts here: Using a service registry that doesn’t suck part I: UDDI is dead Using a service registry that doesn’t suck part II: Dear registry, do you have to be a message broker? This time I’ve decided to focus on what of the aspects that drives me ABSOLUTELY INSANE about traditional SOA Governance solutions: service testing or I should I say the lack of...(read more)

    Read the article

  • Unit-Testing functions which have parameters of classes where source code is not accessible

    - by McMannus
    Relating to this question, I have another question regarding unit testing functions in the utility classes: Assume you have function signatures like this: public function void doSomething(InternalClass obj, InternalElement element) where InternalClass and InternalElement are both Classes which source code are not available, because they are hidden in the API. Additionally, doSomething only operates on obj and element. I thought about mocking those classes away but this option is not possible due to the fact that they do not implement an interface at all which I could use for my Mocking classes. However, I need to fill obj with defined data to test doSomething. How can this problem be solved?

    Read the article

  • Unit Testing DateTime – The Crazy Way

    - by João Angelo
    We all know that the process of unit testing code that depends on DateTime, particularly the current time provided through the static properties (Now, UtcNow and Today), it’s a PITA. If you go ask how to unit test DateTime.Now on stackoverflow I’ll bet that you’ll get two kind of answers: Encapsulate the current time in your own interface and use a standard mocking framework; Pull out the big guns like Typemock Isolator, JustMock or Microsoft Moles/Fakes and mock the static property directly. Now each alternative has is pros and cons and I would have to say that I glean more to the second approach because the first adds a layer of abstraction just for the sake of testability. However, the second approach depends on commercial tools that not every shop wants to buy or in the not so friendly Microsoft Moles. (Sidenote: Moles is now named Fakes and it will ship with VS 2012) This tends to leave people without an acceptable and simple solution so after reading another of these types of questions in SO I came up with yet another alternative, one based on the first alternative that I presented here but tries really hard to not get in your way with yet another layer of abstraction. So, without further dues, I present you, the Tardis. The Tardis is single section of conditionally compiled code that overrides the meaning of the DateTime expression inside a single class. You still get the normal coding experience of using DateTime all over the place, but in a DEBUG compilation your tests will be able to mock every static method or property of the DateTime class. An example follows, while the full Tardis code can be downloaded from GitHub: using System; using NSubstitute; using NUnit.Framework; using Tardis; public class Example { public Example() : this(string.Empty) { } public Example(string title) { #if DEBUG this.DateTime = DateTimeProvider.Default; this.Initialize(title); } internal IDateTimeProvider DateTime { get; set; } internal Example(string title, IDateTimeProvider provider) { this.DateTime = provider; #endif this.Initialize(title); } private void Initialize(string title) { this.Title = title; this.CreatedAt = DateTime.UtcNow; } private string title; public string Title { get { return this.title; } set { this.title = value; this.UpdatedAt = DateTime.UtcNow; } } public DateTime CreatedAt { get; private set; } public DateTime UpdatedAt { get; private set; } } public class TExample { public void T001() { // Arrange var tardis = Substitute.For<IDateTimeProvider>(); tardis.UtcNow.Returns(new DateTime(2000, 1, 1, 6, 6, 6)); // Act var sut = new Example("Title", tardis); // Assert Assert.That(sut.CreatedAt, Is.EqualTo(tardis.UtcNow)); } public void T002() { // Arrange var tardis = Substitute.For<IDateTimeProvider>(); var sut = new Example("Title", tardis); tardis.UtcNow.Returns(new DateTime(2000, 1, 1, 6, 6, 6)); // Act sut.Title = "Updated"; // Assert Assert.That(sut.UpdatedAt, Is.EqualTo(tardis.UtcNow)); } } This approach is also suitable for other similar classes with commonly used static methods or properties like the ConfigurationManager class.

    Read the article

  • Can unit tests verify software requirements?

    - by Peter Smith
    I have often heard unit tests help programmers build confidence in their software. But is it enough for verifying that software requirements are met? I am losing confidence that software is working just because the unit tests pass. We have experienced some failures in production deployment due to an untested\unverified execution path. These failures are sometimes quite large, impact business operations and often requires an immediate fix. The failure is very rarely traced back to a failing unit test. We have large unit test bodies that have reasonable line coverage but almost all of these focus on individual classes and not on their interactions. Manual testing seems to be ineffective because the software being worked on is typically large with many execution paths and many integration points with other software. It is very painful to manually test all of the functionality and it never seems to flush out all the bugs. Are we doing unit testing wrong when it seems we still are failing to verify the software correctly before deployment? Or do most shops have another layer of automated testing in addition to unit tests?

    Read the article

  • design pattern for unit testing?

    - by Maddy.Shik
    I am beginner in developing test cases, and want to follow good patterns for developing test cases rather than following some person or company's specific ideas. Some people don't make test cases and just develop the way their senior have done in their projects. I am facing lot problems like object dependencies (when want to test method which persist A object i have to first persist B object since A is child of B). Please suggest some good books or sites preferably for learning design pattern for unit test cases. Or reference to some good source code or some discussion for Dos and Donts will do wonder. So that i can avoid doing mistakes be learning from experience of others.

    Read the article

  • Area of testing

    - by ?????? ??????????
    I'm trying to understand which part of my code I should to test. I have some code. Below is example of this code, just to understand the idea. Depends of some parametrs I put one or another currency to "Event" and return his serialization in the controller. Which part of code I should to test? Just the final serialization, or only "Event" or every method: getJson, getRows, fillCurrency, setCurrency? class Controller { public function getJson() { $rows = $eventManager->getRows(); return new JsonResponse($rows); } } class EventManager { public function getRows() { //some code here if ($parameter == true) { $this->fillCurrency($event, $currency); } } public function fillCurrency($event, $currency) { //some code here if ($parameters == true) { $event->setCurrency($currency); } } } class Event { public function setCurrency($currency) { $this->updatedAt = new Datetime(); $this->currency = $currency; } }

    Read the article

  • How much detail is in a good UI regression test?

    - by GlenPeterson
    We use a detailed step-by-step user-interface regression test for our commercial web application. It has a "backbone" test for the most used / most important parts of the system, with optional tests for specific areas of functionality. Using this plan has definitely helped us ensure high quality software. But, having very specific tests can be counter-productive. The tester concentrates on following the test and will completely miss usability issues, or not notice fairly obvious problems such as the bottom part of a page that is missing. By contrast, some of the best UI testing happens when building a demo of a new feature. I often do my own best testing by pretending to demonstrate the system to an imaginary prospect. Yet when I tell the testers, "Just demonstrate the system to yourself" they don't cover nearly as much functionality as they do with a detailed point-by-point test. I'm repeatedly asked to provide more and more detail in the test plan so that a new untrained tester can test with it without asking any questions. Yet details seem to be counter-productive. How much detail do you put in a regression test to make it effective? What techniques make the tester to focus more on the system than on checking off items on the test?

    Read the article

  • Unit testing a database connection and general questions on database-dependent code and unit testing

    - by dotnetdev
    Hi, If I have a method which establishes a database connection, how could this method be tested? Returning a bool in the event of a successful connection is one way, but is that the best way? From a testability method, is it best to have the connection method as one method and the method to get data back a seperate method? Also, how would I test methods which get back data from a database? I may do an assert against expected data but the actual data can change and still be the right resultset. EDIT: For the last point, to check data, if it's supposed to be a list of cars, then I can check they are real car models. Or if they are a bunch of web servers, I can have a list of existant web servers on the system, return that from the code under test, and get the test result. If the results are different, the data is the issue but the query not? THnaks

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >