<!-- HILSTER htf 4.3.1 -->
**htf 4.3.1** · [HTML](../metadata.html) · [Complete PDF manual](../_downloads/htf-4.3.1.pdf)

# Metadata

Tests can have metadata, i.e. the source filename, revision, id, etc. .

### *class* htf.MetaData(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

`MetaData` can be used to mark variables to be handled as meta data.

For example `MetaData` can be used to set additional attributes of a
test case that is put into the meta data section of a test report.

Initialize self.  See help(type(self)) for accurate signature.

Example usage:

```python
import htf


class ExampleTestCase(htf.TestCase):
    Id = htf.MetaData("$Id: example.py, author, deadbeef $")
    Revision = htf.MetaData("$Revision: deadbeef $")

    def test_1(self):
        pass

if __name__ == "__main__":
    htf.main()
```

## Keywords

Commonly keywords are used in source code, eg. `$Id: ...$`.

There are several metadata aliases for these keywords. The resulting metadata
the content but not the keywords that is actually expanded.

### *class* htf.Id(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns “an id” in test report.

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
Id("$Id$")
```

### *class* htf.Revision(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns “a revision” in test report.

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    Revision = Revision("$Revision$")
```

### *class* htf.Rev(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns “a revision” in test report.

Alias of [`Revision`](#htf.Revision).

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    Rev = Rev("$Rev$")
```

### *class* htf.LastChangedRevision(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns “a revision” in test report.

Alias of [`Revision`](#htf.Revision).

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    LastChangedRevision = LastChangedRevision("$LastChangedRevision$")
```

### *class* htf.Date(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns “a date” in test report.

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    Date = Date("$Date$")
```

### *class* htf.LastChangedDate(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns “a date” in test report.

Alias of [`Date`](#htf.Date).

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    LastChangedDate = LastChangedDate("$LastChangedDate$")
```

### *class* htf.Header(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns “a header” in test report.

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    Header = Header("$Header$")
```

### *class* htf.Author(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns “an author” in test report.

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    Author = Author("$Author$")
```

### *class* htf.LastChangedBy(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns the author of the last modification of the document.

Alias of [`Author`](#htf.Author).

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    LastChangedBy = LastChangedBy("$LastChangedBy$")
```

### *class* htf.Source(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns: “a source file” in test report.

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    Source = Source("$Source$")
```

### *class* htf.HeadURL(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns: “[https://server:port:/file](https://server:port:/file)” in test report.

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    HeadURL = HeadURL("$HeadURL$")
```

### *class* htf.URL(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns: “[https://server:port:/file](https://server:port:/file)” in test report.

Alias of [`HeadURL`](#htf.HeadURL).

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    URL = URL("$URL$")
```

### *class* htf.RCSFile(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns: RCSFile marker

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    RCSFile = RCSFile("$RCSFile$")
```

### *class* htf.RCSfile(value: [str](https://docs.python.org/3/builtins/stdtypes.html#str) | [bytes](https://docs.python.org/3/builtins/stdtypes.html#bytes))

Returns: RCSfile marker

Alias of [`RCSFile`](#htf.RCSFile).

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    RCSfile = RCSfile("$RCSfile$")
```

## Miscellaneous

### *class* htf.markers.TestingframeworkVersion

Returns: “htf-<htf-version> on Python <python-version>” in test report.

Initialize self.  See help(type(self)) for accurate signature.

Example Usage:

```python
class Test(TestCase):

    testingframeworkVersion = TestingframeworkVersion()
```
