The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
32 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
16 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 ...
0
votes
0answers
26 views

Drupal 7 behat, context class not found

I am trying to set up the behat to work with drupal 7. After following all instructions for installing behat_testing I am getting when I attempt to run it: [RuntimeException] ...
0
votes
1answer
11 views

Why are no tests shown on testing overview?

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 ...
1
vote
1answer
56 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
24 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
0answers
14 views

How to test commerce_sp end dates (subscription product)

Is there an easy way to test commerce_sp end date rules? The lowest I can get the time period is 1 week, which is not helpful when tweaking "supscription end" rules by trial and error. Is there a ...
0
votes
1answer
57 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
53 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
0answers
59 views

Select Query not searching through test case in solr

I have a gradle project in which I posted an xml file to solr. when searching any keyword through select query(in browser), I get the desired result. But when I do the same thing in my test case, it ...
0
votes
1answer
119 views

Disable lock_release_all

I am testing my module, using a custom SQLite database. It has minnimal amount of tables, necessary for the module. I run this function. function test_header(&$modules, &$path_var = null) { ...
0
votes
1answer
206 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
38 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 ...
0
votes
0answers
24 views

How to call menu routing in DrupalWebTestCase for api

I'm trying to write functional tests for an api I'm building. I'd like to be able to call the actual endpoint, using appropriate GET, POST and other methods. I'm currently working on the index, so ...
1
vote
0answers
56 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
30 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
108 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
162 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
41 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 ...
0
votes
1answer
215 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
146 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
74 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
64 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
156 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
64 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
88 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
110 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
182 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
48 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
129 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
49 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
94 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, ...
12
votes
1answer
136 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
135 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: ...
4
votes
1answer
1k 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
194 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
192 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
461 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
291 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 ...
1
vote
4answers
3k 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 ...
0
votes
3answers
276 views

How can I automatically restore my site from a backup using the command line for testing purposes?

I am on Mac OS X using MAMP PRO as my local development environment. I want to quickly reset my site to a known state in order to run some tests I have prepared in Selenium. I have the Backup and ...
1
vote
2answers
190 views

Should a fresh install of Drupal have failing tests and what to do with the failing tests?

I'm delving into the world of SimpleTest in Drupal. I started off by doing a fresh installation of Drupal 7 and running all the tests. I noticed there are a few tests that are failing, along with 1 ...
4
votes
2answers
425 views

Testing Email locally? Could i reroute email to watchdog?

I'm trying to debug how an email invoice looks in ubercart locally. Mail is not configured on my local machine (ubuntu 11.10). I really would prefer to debug this locally without sending nagging ...
3
votes
2answers
2k views

How to load module include files in .test file?

I'm trying to update the Drupal 7 version of the password_policy.test file that is included with the Password Policy module. When I run the tests, I'm getting "Fatal error: Call to undefined function ...
3
votes
1answer
384 views

How to SimpleTest a module's use of drupal_alter() or module_invoke_all()?

I'm developing a custom module. My module calls drupal_alter() with a $type unique to my module, so other modules can alter the behavior of my module. I'd like to write a SimpleTest for my module, ...
6
votes
1answer
92 views

Best practice when testing module updates

A problem I face on a regular basis is trying to test sites that have recently had a lot of module updates. My usual process is to take each module on a case by case basis and test site features ...
13
votes
4answers
2k views

How to debug permissions?

How to debug permissions in Drupal 7 ? I use core reporting, error logs, devel module error logs, backtrace and node access permission block but sometimes it is not enough. What else to check to find ...
0
votes
1answer
59 views

Testing site with login access AND login inside

I know it is counterintuitive, but I need to make my testing site secure and within it I need to test the user login module, so apparently I would be needing two login modules. Is there a module that ...
0
votes
3answers
220 views

About Drupal, “software testing” and “regression testing” with Drupal

My company has taken maintenance of a Drupal website where there are some modules that have been specifically developed for this site. I have to answer to a question that most software do: how can we ...