The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
15 views

Functional testing without using simpletest

I have recently joined a Drupal project at work that is approx 50% finished. Functional testing was never part of the project. The site has about 8 custom modules and they are not going to be used ...
0
votes
0answers
21 views

Fatal Error while sending a multipart POST request to a image upload created using Field API

While testing a site i created using "Acunetix" web vulnerability scanner, it posted a multipart request to a image upload field created using Field API. The test manipulated a POST statement and ...
0
votes
2answers
28 views

Is there an efficient easy way to test Drupal code while developing it?

While writing code making sure, for example, I'm access the correct array property I keep refreshing the browser.(Or, that I didn't make a semantic mistake like that last sentence but in code) Is ...
4
votes
1answer
26 views

How do I re-queue a test that has been postponed on Drupal.org?

I'm trying to run the tests on a patch on Drupal.org. The relevant issue is here. The status is marked as Test request sent but more than a week has passed and the test hasn't been run. I tried ...
0
votes
0answers
29 views

Can you execute Simpletest on a specific folder (i.e. a folder of custom modules)?

Is there a way to execute Simpletest on a specific folder (i.e. a folder of custom modules)? or are you forced to either execute all of them or specify all of the "groups"? I noticed that in there ...
0
votes
1answer
47 views

How to log in to Drupal 7 website with jmeter

I am trying to set up an load test using jmeter. As part of the test I want to be able to log in as the site administrator and then go to admin page. For some reason the test is not able to login as ...
3
votes
1answer
114 views

How to bypass CAPTCHA during Behat functional testing?

We have a site that uses the CAPTCHA and CAPTCHA After modules to protect forms from invalid submissions. We're doing some functional and BDD testing using Behat and the tests are sometimes triggering ...
1
vote
0answers
8 views

Understanding Pantheon Workflows and Best Practices for Deployment to an Active Site [duplicate]

I've currently moved an active user site over to Pantheon. It's structured and themed extensively using Panels Everywhere, Panels, Views, and Display Suite. What I would love to do now, is on the ...
1
vote
2answers
64 views

Writing functional tests for a controller that makes call to external service?

I'm working on the D8 version of the CAS module. To integrate with a single sign on CAS server, this module will have to redirect the user to the CAS server often, and occasionally make cURL requests ...
-1
votes
1answer
23 views

Easy way to test 1000's of pages on Drupal 7 for errors?

What are some automated testing tools for Drupal 7 where I can spider through all the dynamically generated and regular nodes of my site to test for php errors? I just updated to php 5.5 and i saw a ...
1
vote
2answers
47 views

Is there a way to load the content types using DrupalWebTestCase?

I'm trying to learn how to do testing in Drupal. I'm pretty new with it so maybe i didn't got it right. well, I'm trying to test some views of content types, but to test those views i need to have ...
1
vote
1answer
33 views

Can I use Simpletest to test site upgrades?

Going through upgrades it's often a bit tedious to test site functionality such as creating and editing nodes. Can Simpletest perform this kind of functionality? Or do I need a solution like Selenium? ...
0
votes
0answers
17 views

SimpleTestClone access to the real $conf array

So for a caching module im trying to write some simpletests using simpletest clone module, and i want to have access to the variables i set in settings.php like: $conf['cache_class_cache_form'] = ...
2
votes
2answers
87 views

How do I post a node that has its created field set to the past in a test class?

I am creating a test class using the framework of the core Testing module for a module that is supposed to autoexpire nodes some time after they've been created. Nodes have two timestamp fields: ...
0
votes
1answer
41 views

Easy database reconfiguration for migration [duplicate]

I have build a Drupal site on my local development server and I am preparing to move it to my test server and eventually my live server. I know where to find the database settings in my settings.php ...
-1
votes
1answer
29 views

Why are no tests shown on testing overview? [closed]

I want to run DrupalWebTestCases on my custom Drupal 7 module. Following the Tutorial at https://drupal.org/simpletest-tutorial-drupal7 i'm stuck at running the tests: also after cache deletion no ...
2
votes
1answer
1k views

Security testing a new site

I'm about to relaunch my company's website using Drupal 7. I'm the sole web engineer in our IT department, so I have a lot on my plate as we approach the launch date. As this is my first major Drupal ...
0
votes
1answer
55 views

Core Testing vs SimpleTest

I have a query concerning the core Testing module and the SimpleTest module. When I install a new site, the Testing module is available but disabled. When enabled, a list of tests are available for a ...
0
votes
1answer
106 views

How to tell travis that test is failed?

I am trying to integrate travis test bots to my module. Travis can run the test correctly, in console log, I can see drush run-test discover pass and fail assertions, but the final result is still ...
0
votes
1answer
97 views

How to sort drush status messages in test scripts?

I'm using drush to run test scripts agains my drupal 7 installation. Simply calling: $ drush scr path/to/myScript.php My script is using drupal_set_message() to output status of my test scripts. ...
0
votes
1answer
306 views

Disable lock_release_all

I am testing my module, using a custom SQLite database. It has minimal amount of tables, necessary for the module. I run this function. function test_header(&$modules, &$path_var = null) { ...
0
votes
1answer
680 views

drush status not showing correct setting from alias file

I'm trying to get drush to work with my test environment, which is actually using a separate database. so here's my alias in aliases.drushrc.php: $aliases['local'] = array( 'root' => ...
1
vote
0answers
45 views

How to create database for testing

I'm implementing http://phactory.org/ to get away from the heavier aspects of test data creation. One of the prerequisite items for this is to start with an empty database, with proper schema. I ...
1
vote
0answers
74 views

Staging / testing environment [closed]

I've started a big project and need to create some kind of staging area or testing environment, where I'm able to start off with developing the site and after launch will be able to use as the server ...
0
votes
2answers
37 views

How can I easily verify if a core or module update has not broken anything?

When I update drupal core or even a couple of modules, I'm always afraid if something breaks. What easy way is there to test a site if anything has broken? Its not feasible for me to test a site that ...
0
votes
3answers
211 views

How to test if user is denied access when her role has no “access content”

Wanting to test that only users with "access content" have access: public function testOnlyAccessContentAccessible() { $web_user = $this->drupalCreateUser(); $this->drupalLogin($web_user); ...
0
votes
1answer
298 views

How do I run unit tests against datasets? (DrupalWebTestCase and DrupalTestCase)

I am testing a module that I am writing against the Unit Testing framework that comes with Drupal 7. All makes sense, and everything asserts as it should. My question though, is it possible to run ...
1
vote
0answers
57 views

Press 'continue' button in simpletest

I am trying to enable modules via POSTing to /admin/modules in a simpletest. It works fine, except that there are dependencies (the whole reason I want to do it this way) and when it requires then ...
2
votes
3answers
416 views

Simpletest fails to create the field_config table

I'm only just getting into TDD with Drupal and unfortunately run into trouble right away. For some reason the simpletest####field_config table isn't being created, and I don't get why; many other ...
3
votes
1answer
187 views

Automated testing module for entire site

I'm looking for a module which will test an entire site each an OS update, or a Drupal core update. E.g. go through each node and let me know there are any 404 returned for JS or CSS files, broken ...
0
votes
0answers
17 views

Is there a way to test or spoof different user access? [duplicate]

Possible Duplicate: Multi-user/role testing, best practices My current style in testing different user access is opening a different browser or opening a private session and logging into a ...
0
votes
1answer
140 views

Why is my alias “NULL” in a test?

I am using Drupal 7, I have Pathauto enabled, and my user has permissions to create new aliases. When I manually create a node, uncheck the checkbox for automatic alias generation, and enter a custom ...
2
votes
1answer
119 views

Version numbers of dependencies in testing

If I'm submitting a test to the qa.drupal.org testbot, and my module requires a dev version of another module in order to function properly, is it adequate to declare the version in my module's .info ...
0
votes
1answer
210 views

Is there a clean-URL-reflective version of file_create_url()?

I have a site with clean URLs enabled and in a test I've written, I compare the current drupalGetHeader('location') to file_create_url($file->uri). The tests passes on my site, but on the ...
0
votes
1answer
97 views

Does DrupalWebTestCase::drupalGet() use the permissions of DrupalWebTestCase::$loggedInUser?

I'm trying to test the permissions of a particular role, and this code: $this->drupalLogin($this->editor_user); $this->drupalGet($node->path['source']); returns a 200 (OK) status, when ...
2
votes
1answer
118 views

Programmatically save altered file

As I mentioned in my previous question I'm attempting to write tests for a patch that will, ideally, trigger the creation of a redirect if the URI of a file changes. My patch uses hook_file_update() ...
0
votes
0answers
168 views

Media module, file usage, and simpletest

I'm trying to write a test that will do the following: Create a user Create an 'article' node Upload a file via Media module Insert that file into the body via pre-determined markup Save the node ...
4
votes
2answers
276 views

Write Drupal Code online

Is there any website that allows to write and test Drupal Code online ? Like this one for PHP writecodeonline.
0
votes
1answer
78 views

Why is my patch failing a test?

When a patch fails testing because it doesn't apply, and the error reads "Ensure the patch applies to the tip of the chosen code-base." what does this mean?
4
votes
1answer
161 views

Invoking Drupal core tests from within a custom module .test script

I am writing a simpletest test script, where I would like to enable my module, and then invoke a Drupal core test to ensure that my module is producing core-compliant results (in particular, I render ...
1
vote
1answer
56 views

$user->uid is always 1 when running automated tests

In my automated tests, I create some users. debug('moderator_user: '.$this->moderator_user->uid); debug('editor_user: '.$this->editor_user->uid); outputs 'moderator_user: 2' ...
0
votes
2answers
109 views

How to do load testing that simulate adding a node with a drupal site?

I know we can use apaceh workbench to do some load testing and provide some statistics. However, how would I go about finding out how many logged in users can perform certain action (adding a node, ...
13
votes
1answer
144 views

Can a database be tested to see if it is inconsistent?

We all know that Drupal doesn't really support the concept of foreign keys in the database, and likely never will1. We also know that it is possible for modules to not do the right thing, or that ...
2
votes
1answer
227 views

Drupal testing with DrupalGetAJAX

I'm working on writing some automated tests for an AJAX API, and getting strange results. If I directly view the page, I see the following output, sent by drupal_json_output: ...
6
votes
1answer
3k views

How to test if honeypot is working on a form?

I have applied the Honeypot module to my site and set it to protect all forms on the site. The problem is I am unsure of how to test it to know that it is working as expected. Can anyone tell me how ...
0
votes
2answers
301 views

Why DrupalWebTestCase processing took so long?

I want to create a test that uses the database, so I must use the DrupaWebTestCase class. I create the following test class with this simple test: class MyModuleTest extends DrupalWebTestCase { ...
0
votes
1answer
274 views

Create a simpletest test to add additional form elements using the “Add another item” button

I am trying to create a test case for my custom module using simpletest in Drupal7. I want to create a node. The problem is that the node edit form contains a number of fields which can have ...
0
votes
1answer
735 views

“Failed to set field” Problem with SimpleTest, testing a form

With SimpleTests, I want to test a form similar to : // Textfield : $form['fieldset_name']['test'] = array( '#type' => 'textfield', ... ); // Submit : ...
1
vote
2answers
461 views

using DrupalWebTestCase - any trick to prevent it from running from scratch each time?

It makes sense to run each test in a completely clean environment. However, before tests can be run, they have to be developed, during this process it is so frustrating to have to wait 3 or 4 minutes ...
3
votes
5answers
5k views

How can I disable all outgoing emails from a site all at once?

There are some automated outgoing emails from my Drupal site like by core system mail, ubercart, webform and Rules. The reason is that I also have a test site which is exactly the copy of the ...